Class: RubyGPG2::StatusLines::Imported
- Inherits:
-
Object
- Object
- RubyGPG2::StatusLines::Imported
- Defined in:
- lib/ruby_gpg2/status_lines/imported.rb
Instance Attribute Summary collapse
-
#key_id ⇒ Object
readonly
Returns the value of attribute key_id.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(opts) ⇒ Imported
constructor
A new instance of Imported.
- #type ⇒ Object
Constructor Details
#initialize(opts) ⇒ Imported
Returns a new instance of Imported.
21 22 23 24 25 |
# File 'lib/ruby_gpg2/status_lines/imported.rb', line 21 def initialize(opts) @raw = opts[:raw] @key_id = opts[:key_id] @user_id = opts[:user_id] end |
Instance Attribute Details
#key_id ⇒ Object (readonly)
Returns the value of attribute key_id.
15 16 17 |
# File 'lib/ruby_gpg2/status_lines/imported.rb', line 15 def key_id @key_id end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
15 16 17 |
# File 'lib/ruby_gpg2/status_lines/imported.rb', line 15 def raw @raw end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
15 16 17 |
# File 'lib/ruby_gpg2/status_lines/imported.rb', line 15 def user_id @user_id end |
Class Method Details
.parse(line) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/ruby_gpg2/status_lines/imported.rb', line 6 def self.parse(line) match = line.match(/^\[GNUPG:\] IMPORTED (.*?) (.*)$/) new( raw: line, key_id: match[1], user_id: match[2] ) end |
Instance Method Details
#==(other) ⇒ Object
31 32 33 |
# File 'lib/ruby_gpg2/status_lines/imported.rb', line 31 def ==(other) other.class == self.class && other.state == state end |
#type ⇒ Object
27 28 29 |
# File 'lib/ruby_gpg2/status_lines/imported.rb', line 27 def type :imported end |