Class: Onlia::Configuration
- Inherits:
-
Object
- Object
- Onlia::Configuration
- Defined in:
- lib/onlia/configuration.rb
Defined Under Namespace
Classes: EnvironmentMismatch
Constant Summary collapse
- ENVIRONMENT_MAP =
{ "production" => "https://api.onlia.ca/api/v1", "development" => "https://test-api.onlia.ca/api/v1", "staging" => "https://test-api.onlia.ca/api/v1", }
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#environment ⇒ Object
Returns the value of attribute environment.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 |
# File 'lib/onlia/configuration.rb', line 13 def initialize @environment = "production" @base_url = ENVIRONMENT_MAP[@environment] @api_key = "" end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/onlia/configuration.rb', line 5 def api_key @api_key end |
#base_url ⇒ Object
Returns the value of attribute base_url.
5 6 7 |
# File 'lib/onlia/configuration.rb', line 5 def base_url @base_url end |
#environment ⇒ Object
Returns the value of attribute environment.
5 6 7 |
# File 'lib/onlia/configuration.rb', line 5 def environment @environment end |