Class: Linzer::Key

Inherits:
Struct
  • Object
show all
Defined in:
lib/linzer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#key_idObject

Returns the value of attribute key_id

Returns:

  • (Object)

    the current value of key_id



15
16
17
# File 'lib/linzer.rb', line 15

def key_id
  @key_id
end

#materialObject

Returns the value of attribute material

Returns:

  • (Object)

    the current value of material



15
16
17
# File 'lib/linzer.rb', line 15

def material
  @material
end

Instance Method Details

#sign(*args) ⇒ Object



16
17
18
19
20
21
# File 'lib/linzer.rb', line 16

def sign(*args)
  # XXX: probably this is going to grow in complexity and will need
  # to be moved to its own class or dispatch to the signer
  !material.nil? or raise Error.new "Cannot sign data, key material cannot be null."
  material.sign(*args)
end