Class: WorldsBestRestaurants::Scraper
- Inherits:
-
Object
- Object
- WorldsBestRestaurants::Scraper
- Defined in:
- lib/worlds_best_restaurants/scraper.rb
Instance Method Summary collapse
Instance Method Details
#get_page ⇒ Object
3 4 5 |
# File 'lib/worlds_best_restaurants/scraper.rb', line 3 def get_page Nokogiri::HTML(open("http://www.theworlds50best.com/list/1-50-winners")) end |
#make_restaurants ⇒ Object
11 12 13 14 15 |
# File 'lib/worlds_best_restaurants/scraper.rb', line 11 def make_restaurants scrape_restaurants_index.each do |r| WorldsBestRestaurants::Restaurant.new_from_index_page(r) end end |
#scrape_restaurants_index ⇒ Object
7 8 9 |
# File 'lib/worlds_best_restaurants/scraper.rb', line 7 def scrape_restaurants_index self.get_page.css("div#t1-50 li") end |