Class: SignatureDfe::Config

Inherits:
Object
  • Object
show all
Includes:
AbstractClass
Defined in:
lib/signature_dfe/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



9
10
11
# File 'lib/signature_dfe/config.rb', line 9

def initialize
  clear
end

Instance Attribute Details

#certObject

Returns the value of attribute cert.



5
6
7
# File 'lib/signature_dfe/config.rb', line 5

def cert
  @cert
end

#password=(value) ⇒ Object (writeonly)

Sets the attribute password

Parameters:

  • value

    the value to set the attribute password to.



7
8
9
# File 'lib/signature_dfe/config.rb', line 7

def password=(value)
  @password = value
end

#pkcs12Object

Returns the value of attribute pkcs12.



5
6
7
# File 'lib/signature_dfe/config.rb', line 5

def pkcs12
  @pkcs12
end

#pkeyObject

Returns the value of attribute pkey.



5
6
7
# File 'lib/signature_dfe/config.rb', line 5

def pkey
  @pkey
end

Instance Method Details

#cert?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/signature_dfe/config.rb', line 24

def cert?
  !(cert.nil? || cert.empty?)
end

#clearObject



13
14
15
16
17
18
# File 'lib/signature_dfe/config.rb', line 13

def clear
  @pkcs12 = nil
  @pkey = nil
  @cert = nil
  @password = nil
end

#inspectObject



20
21
22
# File 'lib/signature_dfe/config.rb', line 20

def inspect
  super.gsub(/, @pass[\s\S]*?>/, '>')
end

#instance_variablesObject



28
29
30
# File 'lib/signature_dfe/config.rb', line 28

def instance_variables
  super - [:@password]
end