Class: GPGME::TrustItem

Inherits:
Object
  • Object
show all
Defined in:
lib/gpgme/ffi/trust_item.rb

Defined Under Namespace

Classes: Pointer

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new_from_struct(pointer) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/gpgme/ffi/trust_item.rb', line 9

def self.new_from_struct(pointer)
  instance = allocate

  instance.instance_exec do
    @ptr = Pointer.new pointer

    structure = Library::TrustItem.new @ptr
    @keyid = structure[:keyid]
    @type = structure[:type]
    @level = structure[:level]
    @owner_trust = structure[:owner_trust]
    @validity = structure[:validity]
    @name = structure[:name]
  end

  instance
end

Instance Method Details

#context_pointerObject



27
28
29
# File 'lib/gpgme/ffi/trust_item.rb', line 27

def context_pointer
  @ptr
end