Class: Hikerapi::Configuration
- Inherits:
-
Object
- Object
- Hikerapi::Configuration
- Defined in:
- lib/hikerapi/configuration.rb
Instance Attribute Summary collapse
-
#api_base_url ⇒ Object
Returns the value of attribute api_base_url.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
Instance Method Summary collapse
-
#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/hikerapi/configuration.rb', line 7 def initialize @api_key = ENV['HIKER_API_KEY'] @api_base_url = 'https://api.hikerapi.com' @open_timeout = 15 @read_timeout = 60 end |
Instance Attribute Details
#api_base_url ⇒ Object
Returns the value of attribute api_base_url.
5 6 7 |
# File 'lib/hikerapi/configuration.rb', line 5 def api_base_url @api_base_url end |
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/hikerapi/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/hikerapi/configuration.rb', line 5 def open_timeout @open_timeout end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
5 6 7 |
# File 'lib/hikerapi/configuration.rb', line 5 def read_timeout @read_timeout end |