Class: TrueLayerSigning::Config
- Inherits:
-
Object
- Object
- TrueLayerSigning::Config
- Defined in:
- lib/truelayer-signing/config.rb
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
readonly
Returns the value of attribute algorithm.
-
#certificate_id ⇒ Object
Returns the value of attribute certificate_id.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize ⇒ TrueLayerSigning::Config constructor
Constructor Details
#initialize ⇒ TrueLayerSigning::Config
16 17 18 19 20 21 |
# File 'lib/truelayer-signing/config.rb', line 16 def initialize @algorithm = "ES512" @certificate_id = ENV.fetch("TRUELAYER_SIGNING_CERTIFICATE_ID", nil) @private_key = ENV.fetch("TRUELAYER_SIGNING_PRIVATE_KEY", nil)&.gsub("\\n", "\n") @version = "2" end |
Instance Attribute Details
#algorithm ⇒ Object (readonly)
Returns the value of attribute algorithm.
6 7 8 |
# File 'lib/truelayer-signing/config.rb', line 6 def algorithm @algorithm end |
#certificate_id ⇒ Object
Returns the value of attribute certificate_id.
5 6 7 |
# File 'lib/truelayer-signing/config.rb', line 5 def certificate_id @certificate_id end |
#private_key ⇒ Object
Returns the value of attribute private_key.
5 6 7 |
# File 'lib/truelayer-signing/config.rb', line 5 def private_key @private_key end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/truelayer-signing/config.rb', line 6 def version @version end |
Class Method Details
.setup ⇒ TrueLayerSigning::Config
9 10 11 12 13 |
# File 'lib/truelayer-signing/config.rb', line 9 def self.setup new.tap do |instance| yield(instance) if block_given? end end |