Class: BreweryDB::Config
- Inherits:
-
Object
- Object
- BreweryDB::Config
- Defined in:
- lib/brewery_db/config.rb
Constant Summary collapse
- BASE_URI =
'http://api.brewerydb.com/v2'- USER_AGENT =
"BreweryDB Ruby Gem #{BreweryDB::VERSION}"- TIMEOUT =
60
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
15 16 17 18 19 20 |
# File 'lib/brewery_db/config.rb', line 15 def initialize self.adapter = Faraday.default_adapter self.base_uri = BASE_URI self.timeout = TIMEOUT self.user_agent = USER_AGENT end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
9 10 11 |
# File 'lib/brewery_db/config.rb', line 9 def adapter @adapter end |
#api_key ⇒ Object
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/brewery_db/config.rb', line 10 def api_key @api_key end |
#base_uri ⇒ Object
Returns the value of attribute base_uri.
11 12 13 |
# File 'lib/brewery_db/config.rb', line 11 def base_uri @base_uri end |
#timeout ⇒ Object
Returns the value of attribute timeout.
12 13 14 |
# File 'lib/brewery_db/config.rb', line 12 def timeout @timeout end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
13 14 15 |
# File 'lib/brewery_db/config.rb', line 13 def user_agent @user_agent end |