Class: Epilicious::Parser
- Inherits:
-
Object
- Object
- Epilicious::Parser
- Defined in:
- lib/epilicious/parser.rb
Instance Method Summary collapse
Instance Method Details
#parse_recipe_page(page) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/epilicious/parser.rb', line 8 def parse_recipe_page(page) recipe = {} recipe[:name] = name(page) recipe[:servings] = servings(page) recipe[:ingredients] = ingredients(page) recipe[:instructions] = instructions(page) recipe end |
#parse_recipes_page(page) ⇒ Object
4 5 6 |
# File 'lib/epilicious/parser.rb', line 4 def parse_recipes_page(page) page.css('.recipe_result_right a').map {|link| link ['href'] } end |