Class: Creem::Configuration
- Inherits:
-
Object
- Object
- Creem::Configuration
- Defined in:
- lib/creem/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#test_mode ⇒ Object
Returns the value of attribute test_mode.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #base_url ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/creem/configuration.rb', line 5 def api_key @api_key end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
5 6 7 |
# File 'lib/creem/configuration.rb', line 5 def open_timeout @open_timeout end |
#test_mode ⇒ Object
Returns the value of attribute test_mode.
5 6 7 |
# File 'lib/creem/configuration.rb', line 5 def test_mode @test_mode end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/creem/configuration.rb', line 5 def timeout @timeout end |
Instance Method Details
#base_url ⇒ Object
14 15 16 |
# File 'lib/creem/configuration.rb', line 14 def base_url test_mode ? TEST_BASE_URL : PRODUCTION_BASE_URL end |