class RubyGPG2::StatusLines::ImportProblem
Constants
- REASONS
Attributes
key_fingerprint[R]
raw[R]
reason[R]
Public Class Methods
new(opts)
click to toggle source
# File lib/ruby_gpg2/status_lines/import_problem.rb, line 25 def initialize(opts) @raw = opts[:raw] @reason = opts[:reason] @key_fingerprint = opts[:key_fingerprint] end
parse(line)
click to toggle source
# File lib/ruby_gpg2/status_lines/import_problem.rb, line 12 def self.parse(line) match = line.match(/^\[GNUPG:\] IMPORT_PROBLEM (\d+) (.*)$/) new( raw: line, reason: REASONS[match[1].to_i], key_fingerprint: match[2]) end
Public Instance Methods
==(other)
click to toggle source
# File lib/ruby_gpg2/status_lines/import_problem.rb, line 35 def ==(other) other.class == self.class && other.state == state end
type()
click to toggle source
# File lib/ruby_gpg2/status_lines/import_problem.rb, line 31 def type :import_problem end
Protected Instance Methods
state()
click to toggle source
# File lib/ruby_gpg2/status_lines/import_problem.rb, line 41 def state [ @raw, @reason, @key_fingerprint ] end