Class: CrmpClient::Configuration
- Inherits:
-
Object
- Object
- CrmpClient::Configuration
- Defined in:
- lib/crmp_client/configuration.rb
Overview
This class acts as a store for global configuration of the CrmpClient gem.
A singleton instance of this class is created in the top-level CrmpClient module code.
Instance Attribute Summary collapse
-
#default_api_token ⇒ Object
Returns the value of attribute default_api_token.
-
#default_base_uri ⇒ Object
Returns the value of attribute default_base_uri.
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 |
# File 'lib/crmp_client/configuration.rb', line 12 def initialize @default_base_uri = nil @default_api_token = nil @logger = defined?(Rails.logger) ? Rails.logger : Logger.new($stdout) end |
Instance Attribute Details
#default_api_token ⇒ Object
Returns the value of attribute default_api_token.
10 11 12 |
# File 'lib/crmp_client/configuration.rb', line 10 def default_api_token @default_api_token end |
#default_base_uri ⇒ Object
Returns the value of attribute default_base_uri.
10 11 12 |
# File 'lib/crmp_client/configuration.rb', line 10 def default_base_uri @default_base_uri end |
#logger ⇒ Object
Returns the value of attribute logger.
10 11 12 |
# File 'lib/crmp_client/configuration.rb', line 10 def logger @logger end |