Class: BreweryDB::Resources::Beers
Instance Method Summary
collapse
#initialize
Instance Method Details
#all(params = {}) ⇒ Object
4
5
6
|
# File 'lib/brewery_db/resources/beers.rb', line 4
def all(params={})
get('beers', params).paginated_collection
end
|
#find(id, params = {}) ⇒ Object
8
9
10
|
# File 'lib/brewery_db/resources/beers.rb', line 8
def find(id, params={})
get('beer/%s' % id, params).data
end
|
#random(params = {}) ⇒ Object
12
13
14
|
# File 'lib/brewery_db/resources/beers.rb', line 12
def random(params={})
find('random', params)
end
|