class RubyGPG2::StatusLines::Imported

Attributes

key_id[R]
raw[R]
user_id[R]

Public Class Methods

new(opts) click to toggle source
# File lib/ruby_gpg2/status_lines/imported.rb, line 17
def initialize(opts)
  @raw = opts[:raw]
  @key_id = opts[:key_id]
  @user_id = opts[:user_id]
end
parse(line) click to toggle source
# File lib/ruby_gpg2/status_lines/imported.rb, line 4
def self.parse(line)
  match = line.match(/^\[GNUPG:\] IMPORTED (.*?) (.*)$/)
  new(
      raw: line,
      key_id: match[1],
      user_id: match[2])
end

Public Instance Methods

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

Protected Instance Methods

state() click to toggle source
# File lib/ruby_gpg2/status_lines/imported.rb, line 33
def state
  [
      @raw,
      @key_id,
      @user_id
  ]
end