Class: RecipeGenerator::Scraper
- Inherits:
-
Object
- Object
- RecipeGenerator::Scraper
- Defined in:
- lib/scraper.rb
Instance Method Summary collapse
Instance Method Details
#get_page ⇒ Object
4 5 6 |
# File 'lib/scraper.rb', line 4 def get_page doc = Nokogiri::HTML(open("http://www.bbcgoodfood.com/recipes/collection/vegetarian")) end |
#make_veggies ⇒ Object
13 14 15 16 17 |
# File 'lib/scraper.rb', line 13 def make_veggies veggies.each do |d| RecipeGenerator::Recipe.new_vegetarian(d) end end |
#veggies ⇒ Object
9 10 11 |
# File 'lib/scraper.rb', line 9 def veggies self.get_page.css("div.view-content > div > span") end |