Class: Onlia::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_keyObject

Returns the value of attribute api_key.



5
6
7
# File 'lib/onlia/configuration.rb', line 5

def api_key
  @api_key
end

#base_urlObject

Returns the value of attribute base_url.



5
6
7
# File 'lib/onlia/configuration.rb', line 5

def base_url
  @base_url
end

#environmentObject

Returns the value of attribute environment.



5
6
7
# File 'lib/onlia/configuration.rb', line 5

def environment
  @environment
end