Module: Tankard::Configuration

Included in:
Tankard
Defined in:
lib/tankard/configuration.rb

Constant Summary collapse

KEYS =
[:api_key]
BREWERYDB_URL =
"http://api.brewerydb.com/v2/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_key=(value) ⇒ Object (writeonly)

Sets the attribute api_key

Parameters:

  • value

    the value to set the attribute api_key to.



3
4
5
# File 'lib/tankard/configuration.rb', line 3

def api_key=(value)
  @api_key = value
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



8
9
10
11
12
13
# File 'lib/tankard/configuration.rb', line 8

def configure
  yield self
  validate_api_key!
  reset_client
  self
end