Class: GPGME::NewSignature

Inherits:
Object
  • Object
show all
Defined in:
lib/gpgme/misc.rb,
lib/gpgme/ffi/new_signature.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fprObject (readonly) Also known as: fingerprint

Returns the value of attribute fpr.



43
44
45
# File 'lib/gpgme/misc.rb', line 43

def fpr
  @fpr
end

#hash_algoObject (readonly)

Returns the value of attribute hash_algo.



43
44
45
# File 'lib/gpgme/misc.rb', line 43

def hash_algo
  @hash_algo
end

#pubkey_algoObject (readonly)

Returns the value of attribute pubkey_algo.



43
44
45
# File 'lib/gpgme/misc.rb', line 43

def pubkey_algo
  @pubkey_algo
end

#sig_classObject (readonly)

Returns the value of attribute sig_class.



43
44
45
# File 'lib/gpgme/misc.rb', line 43

def sig_class
  @sig_class
end

#typeObject (readonly)

Returns the value of attribute type.



43
44
45
# File 'lib/gpgme/misc.rb', line 43

def type
  @type
end

Class Method Details

.new_from_struct(struct) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/gpgme/ffi/new_signature.rb', line 3

def self.new_from_struct(struct)
  instance = allocate

  instance.instance_exec do
    @type        = struct[:type]
    @pubkey_algo = struct[:pubkey_algo]
    @hash_algo   = struct[:hash_algo]
    @sig_class   = struct[:sig_class]
    @timestamp   = struct[:timestamp]
    @fpr         = struct[:fpr]
  end

  instance
end

Instance Method Details

#timestampObject



46
47
48
# File 'lib/gpgme/misc.rb', line 46

def timestamp
  Time.at(@timestamp)
end