Module: Tankard::Configuration
- Included in:
- Tankard
- Defined in:
- lib/tankard/configuration.rb
Overview
Configuring and validating credentials
Constant Summary collapse
- KEYS =
[:api_key]
- BREWERYDB_URL =
'http://api.brewerydb.com/v2/'
Instance Attribute Summary collapse
-
#api_key ⇒ Object
writeonly
Sets the attribute api_key.
Instance Method Summary collapse
Instance Attribute Details
#api_key=(value) ⇒ Object (writeonly)
Sets the attribute api_key
6 7 8 |
# File 'lib/tankard/configuration.rb', line 6 def api_key=(value) @api_key = value end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
11 12 13 14 15 16 |
# File 'lib/tankard/configuration.rb', line 11 def configure yield self validate_api_key! reset_client self end |