Class: Hangry::Parsers::NonStandard::AllRecipesParser
- Inherits:
-
SchemaOrgRecipeParser
- Object
- RecipeParser
- SchemaOrgRecipeParser
- Hangry::Parsers::NonStandard::AllRecipesParser
- Defined in:
- lib/hangry/parsers/non_standard/all_recipes_parser.rb
Instance Attribute Summary
Attributes inherited from RecipeParser
#nokogiri_doc, #nutrition_ast, #recipe, #recipe_ast, #recipe_html
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SchemaOrgRecipeParser
ingredient_itemprop, nutrition_selector, root_selector
Methods inherited from RecipeParser
canonical_url_matches_domain?, #initialize, #parse
Constructor Details
This class inherits a constructor from Hangry::RecipeParser
Class Method Details
.can_parse?(html) ⇒ Boolean
6 7 8 |
# File 'lib/hangry/parsers/non_standard/all_recipes_parser.rb', line 6 def self.can_parse?(html) canonical_url_matches_domain?(html, 'allrecipes.com') end |
Instance Method Details
#parse_instructions ⇒ Object
10 11 12 |
# File 'lib/hangry/parsers/non_standard/all_recipes_parser.rb', line 10 def parse_instructions recipe_ast.css('.directions ol').first.content end |