class RubyGPG2::StatusLines::KeyConsidered

Constants

FLAGS

Attributes

flags[R]
key_fingerprint[R]
raw[R]

Public Class Methods

new(opts) click to toggle source
# File lib/ruby_gpg2/status_lines/key_considered.rb, line 23
def initialize(opts)
  @raw = opts[:raw]
  @key_fingerprint = opts[:key_fingerprint]
  @flags = opts[:flags]
end
parse(line) click to toggle source
# File lib/ruby_gpg2/status_lines/key_considered.rb, line 10
def self.parse(line)
  match = line.match(/^\[GNUPG:\] KEY_CONSIDERED (.*) (.*)$/)
  new(
      raw: line,
      key_fingerprint: match[1],
      flags: FLAGS[match[2]])
end

Public Instance Methods

==(other) click to toggle source
# File lib/ruby_gpg2/status_lines/key_considered.rb, line 33
def ==(other)
  other.class == self.class && other.state == state
end
type() click to toggle source
# File lib/ruby_gpg2/status_lines/key_considered.rb, line 29
def type
  :key_considered
end

Protected Instance Methods

state() click to toggle source
# File lib/ruby_gpg2/status_lines/key_considered.rb, line 39
def state
  [
      @raw,
      @key_fingerprint,
      @flags
  ]
end