Exception: Akabei::Signer::AmbiguousKey
- Defined in:
- lib/akabei/signer.rb
Instance Attribute Summary collapse
-
#found_keys ⇒ Object
readonly
Returns the value of attribute found_keys.
-
#key_name ⇒ Object
readonly
Returns the value of attribute key_name.
Instance Method Summary collapse
- #formatted_keys ⇒ Object
-
#initialize(key_name, found_keys) ⇒ AmbiguousKey
constructor
A new instance of AmbiguousKey.
Constructor Details
#initialize(key_name, found_keys) ⇒ AmbiguousKey
Returns a new instance of AmbiguousKey.
16 17 18 19 20 |
# File 'lib/akabei/signer.rb', line 16 def initialize(key_name, found_keys) @key_name = key_name @found_keys = found_keys super("Ambiguous GPG key: #{key_name}: #{formatted_keys}") end |
Instance Attribute Details
#found_keys ⇒ Object (readonly)
Returns the value of attribute found_keys.
15 16 17 |
# File 'lib/akabei/signer.rb', line 15 def found_keys @found_keys end |
#key_name ⇒ Object (readonly)
Returns the value of attribute key_name.
15 16 17 |
# File 'lib/akabei/signer.rb', line 15 def key_name @key_name end |
Instance Method Details
#formatted_keys ⇒ Object
22 23 24 25 26 27 |
# File 'lib/akabei/signer.rb', line 22 def formatted_keys @found_keys.map do |key| subkey = key.primary_subkey "#{subkey.length}#{subkey.pubkey_algo_letter}/#{subkey.fingerprint[-8 .. -1]}" end end |