Class: Rnp::UserID

Inherits:
Object
  • Object
show all
Defined in:
lib/rnp/userid.rb

Overview

Class that represents a UserID

Instance Method Summary collapse

Instance Method Details

#each_signature(&block) ⇒ self, Enumerator

Enumerate each Signature for this key.

Returns:

  • (self, Enumerator)


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

#inspectObject



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.

Returns:

  • (Boolean)


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

#signaturesArray<Signature>

Get a list of all Signatures for this key.

Returns:



50
51
52
# File 'lib/rnp/userid.rb', line 50

def signatures
  each_signature.to_a
end

#to_sObject



34
35
36
# File 'lib/rnp/userid.rb', line 34

def to_s
  @userid
end