Class: RubyGPG2::Key
- Inherits:
-
Object
- Object
- RubyGPG2::Key
- Defined in:
- lib/ruby_gpg2/key.rb
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
readonly
Returns the value of attribute algorithm.
-
#capabilities ⇒ Object
readonly
Returns the value of attribute capabilities.
-
#compliance_modes ⇒ Object
readonly
Returns the value of attribute compliance_modes.
-
#creation_date ⇒ Object
readonly
Returns the value of attribute creation_date.
-
#fingerprint ⇒ Object
readonly
Returns the value of attribute fingerprint.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#owner_trust ⇒ Object
readonly
Returns the value of attribute owner_trust.
-
#serial_number ⇒ Object
readonly
Returns the value of attribute serial_number.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#user_ids ⇒ Object
readonly
Returns the value of attribute user_ids.
-
#validity ⇒ Object
readonly
Returns the value of attribute validity.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(opts) ⇒ Key
constructor
rubocop:disable Metrics/MethodLength rubocop:disable Metrics/AbcSize.
-
#primary_user_id ⇒ Object
rubocop:enable Metrics/AbcSize rubocop:enable Metrics/MethodLength.
Constructor Details
#initialize(opts) ⇒ Key
rubocop:disable Metrics/MethodLength rubocop:disable Metrics/AbcSize
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ruby_gpg2/key.rb', line 23 def initialize(opts) @type = opts[:type] @validity = opts[:validity] @length = opts[:length] @algorithm = opts[:algorithm] @id = opts[:id] @creation_date = opts[:creation_date] @owner_trust = opts[:owner_trust] @capabilities = opts[:capabilities] @serial_number = opts[:serial_number] @compliance_modes = opts[:compliance_modes] @origin = opts[:origin] @fingerprint = opts[:fingerprint] @user_ids = opts[:user_ids] end |
Instance Attribute Details
#algorithm ⇒ Object (readonly)
Returns the value of attribute algorithm.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def algorithm @algorithm end |
#capabilities ⇒ Object (readonly)
Returns the value of attribute capabilities.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def capabilities @capabilities end |
#compliance_modes ⇒ Object (readonly)
Returns the value of attribute compliance_modes.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def compliance_modes @compliance_modes end |
#creation_date ⇒ Object (readonly)
Returns the value of attribute creation_date.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def creation_date @creation_date end |
#fingerprint ⇒ Object (readonly)
Returns the value of attribute fingerprint.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def fingerprint @fingerprint end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def id @id end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def length @length end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def origin @origin end |
#owner_trust ⇒ Object (readonly)
Returns the value of attribute owner_trust.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def owner_trust @owner_trust end |
#serial_number ⇒ Object (readonly)
Returns the value of attribute serial_number.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def serial_number @serial_number end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def type @type end |
#user_ids ⇒ Object (readonly)
Returns the value of attribute user_ids.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def user_ids @user_ids end |
#validity ⇒ Object (readonly)
Returns the value of attribute validity.
5 6 7 |
# File 'lib/ruby_gpg2/key.rb', line 5 def validity @validity end |
Instance Method Details
#==(other) ⇒ Object
45 46 47 |
# File 'lib/ruby_gpg2/key.rb', line 45 def ==(other) other.class == self.class && other.state == state end |
#primary_user_id ⇒ Object
rubocop:enable Metrics/AbcSize rubocop:enable Metrics/MethodLength
41 42 43 |
# File 'lib/ruby_gpg2/key.rb', line 41 def primary_user_id @user_ids&.first end |