class RubyGPG2::StatusLines::KeyCreated
Constants
- KEY_TYPES
Attributes
handle[R]
key_fingerprint[R]
key_type[R]
raw[R]
Public Class Methods
new(opts)
click to toggle source
# File lib/ruby_gpg2/status_lines/key_created.rb, line 25 def initialize(opts) @raw = opts[:raw] @key_type = opts[:key_type] @key_fingerprint = opts[:key_fingerprint] @handle = opts[:handle] end
parse(line)
click to toggle source
# File lib/ruby_gpg2/status_lines/key_created.rb, line 10 def self.parse(line) match = line.match(/^\[GNUPG:\] KEY_CREATED (.) (.*?)(?: (.*))?$/) new( raw: line, key_type: KEY_TYPES[match[1]], key_fingerprint: match[2], handle: match[3]) end
Public Instance Methods
==(other)
click to toggle source
# File lib/ruby_gpg2/status_lines/key_created.rb, line 36 def ==(other) other.class == self.class && other.state == state end
type()
click to toggle source
# File lib/ruby_gpg2/status_lines/key_created.rb, line 32 def type :key_created end
Protected Instance Methods
state()
click to toggle source
# File lib/ruby_gpg2/status_lines/key_created.rb, line 42 def state [ @raw, @key_type, @key_fingerprint ] end