Class: Creem::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/creem/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
10
11
12
# File 'lib/creem/configuration.rb', line 7

def initialize
  @api_key = nil
  @test_mode = false
  @timeout = 30
  @open_timeout = 10
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



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

def api_key
  @api_key
end

#open_timeoutObject

Returns the value of attribute open_timeout.



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

def open_timeout
  @open_timeout
end

#test_modeObject

Returns the value of attribute test_mode.



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

def test_mode
  @test_mode
end

#timeoutObject

Returns the value of attribute timeout.



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

def timeout
  @timeout
end

Instance Method Details

#base_urlObject



14
15
16
# File 'lib/creem/configuration.rb', line 14

def base_url
  test_mode ? TEST_BASE_URL : PRODUCTION_BASE_URL
end