Module: RateBeer
- Defined in:
- lib/ratebeer.rb,
lib/ratebeer/beer.rb,
lib/ratebeer/urls.rb,
lib/ratebeer/style.rb,
lib/ratebeer/region.rb,
lib/ratebeer/review.rb,
lib/ratebeer/search.rb,
lib/ratebeer/brewery.rb,
lib/ratebeer/country.rb,
lib/ratebeer/location.rb,
lib/ratebeer/scraping.rb,
lib/ratebeer/beer/alias.rb,
lib/ratebeer/brewery/beer_list.rb
Overview
RateBeer.com scraper
Scrapes required information on beers, breweries, ratings, etc. from the RateBeer.com beer database.
Defined Under Namespace
Modules: Beer, Brewery, Scraping, URLs Classes: Country, Location, Region, Review, Search, Style
Instance Method Summary collapse
-
#beer(id, name = nil) ⇒ RateBeer::Beer
Create new beer instance, using ID and name passed as arguments.
-
#brewery(id, name = nil) ⇒ RateBeer::Brewery
Create new brewery instance, using ID and name passed as arguments.
-
#search(query) ⇒ Hash<Array>
Search for a particulary beer or brewery.
-
#style(id, name = nil) ⇒ RateBeer::Style
Create new style instance, using ID and name passed as arguments.
Instance Method Details
#beer(id, name = nil) ⇒ RateBeer::Beer
Create new beer instance, using ID and name passed as arguments.
15 16 17 |
# File 'lib/ratebeer.rb', line 15 def beer(id, name = nil) Beer::Beer.new(id, name: name) end |
#brewery(id, name = nil) ⇒ RateBeer::Brewery
Create new brewery instance, using ID and name passed as arguments.
25 26 27 |
# File 'lib/ratebeer.rb', line 25 def brewery(id, name = nil) Brewery::Brewery.new(id, name: name) end |
#search(query) ⇒ Hash<Array>
Search for a particulary beer or brewery.
45 46 47 |
# File 'lib/ratebeer.rb', line 45 def search(query) Search.search(query) end |
#style(id, name = nil) ⇒ RateBeer::Style
Create new style instance, using ID and name passed as arguments.
35 36 37 |
# File 'lib/ratebeer.rb', line 35 def style(id, name = nil) Style.new(id, name: name) end |