Class: FidorApi::Client::Configuration
- Inherits:
-
Object
- Object
- FidorApi::Client::Configuration
- Defined in:
- lib/fidor_api/client/configuration.rb
Constant Summary collapse
- ATTRIBUTES =
%i[ environment client_id client_secret logger log_bodies verify_ssl faraday ].freeze
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #validate! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 23 24 |
# File 'lib/fidor_api/client/configuration.rb', line 18 def initialize self.environment = Environment::FidorDE::Sandbox.new self.logger = Logger.new(STDOUT) self.log_bodies = true self.verify_ssl = true self.faraday = ->(faraday) {} end |
Instance Method Details
#validate! ⇒ Object
26 27 28 29 30 31 |
# File 'lib/fidor_api/client/configuration.rb', line 26 def validate! ATTRIBUTES.each do |key| raise "Missing config value for `#{key}`!" \ if instance_variable_get("@#{key}").nil? end end |