Class: Rnp::UserID
- Inherits:
-
Object
- Object
- Rnp::UserID
- Defined in:
- lib/rnp/userid.rb
Overview
Class that represents a UserID
Instance Method Summary collapse
-
#each_signature(&block) ⇒ self, Enumerator
Enumerate each Signature for this key.
- #inspect ⇒ Object
-
#revoked? ⇒ Boolean
Check if this key is revoked.
-
#signatures ⇒ Array<Signature>
Get a list of all Signatures for this key.
- #to_s ⇒ Object
Instance Method Details
#each_signature(&block) ⇒ self, Enumerator
Enumerate each Signature for this key.
41 42 43 44 45 |
# File 'lib/rnp/userid.rb', line 41 def each_signature(&block) block or return enum_for(:signature_iterator) signature_iterator(&block) self end |
#inspect ⇒ Object
30 31 32 |
# File 'lib/rnp/userid.rb', line 30 def inspect Rnp.inspect_ptr(self) end |
#revoked? ⇒ Boolean
Check if this key is revoked.
57 58 59 60 61 |
# File 'lib/rnp/userid.rb', line 57 def revoked? presult = FFI::MemoryPointer.new(:bool) Rnp.call_ffi(:rnp_uid_is_revoked, @ptr, presult) presult.read(:bool) end |
#signatures ⇒ Array<Signature>
Get a list of all Signatures for this key.
50 51 52 |
# File 'lib/rnp/userid.rb', line 50 def signatures each_signature.to_a end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/rnp/userid.rb', line 34 def to_s @userid end |