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
14 15 16 17 18 19 |
# File 'lib/truelayer-signing/config.rb', line 14 def initialize @algorithm = "ES512".freeze @certificate_id = ENV.fetch("TRUELAYER_SIGNING_CERTIFICATE_ID", nil).freeze @private_key = ENV.fetch("TRUELAYER_SIGNING_PRIVATE_KEY", nil)&.gsub(/\\n/, "\n").freeze @version = "2".freeze end |
Instance Attribute Details
#algorithm ⇒ Object (readonly)
Returns the value of attribute algorithm.
4 5 6 |
# File 'lib/truelayer-signing/config.rb', line 4 def algorithm @algorithm end |
#certificate_id ⇒ Object
Returns the value of attribute certificate_id.
3 4 5 |
# File 'lib/truelayer-signing/config.rb', line 3 def certificate_id @certificate_id end |
#private_key ⇒ Object
Returns the value of attribute private_key.
3 4 5 |
# File 'lib/truelayer-signing/config.rb', line 3 def private_key @private_key end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
4 5 6 |
# File 'lib/truelayer-signing/config.rb', line 4 def version @version end |
Class Method Details
.setup ⇒ TrueLayerSigning::Config
7 8 9 10 11 |
# File 'lib/truelayer-signing/config.rb', line 7 def self.setup new.tap do |instance| yield(instance) if block_given? end end |