Class: Hangry::DefaultRecipeParser

Inherits:
RecipeParser show all
Defined in:
lib/hangry/default_recipe_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 RecipeParser

canonical_url_matches_domain?

Constructor Details

#initialize(html) ⇒ DefaultRecipeParser

Returns a new instance of DefaultRecipeParser.



7
8
# File 'lib/hangry/default_recipe_parser.rb', line 7

def initialize(html)
end

Class Method Details

.can_parse?(html) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/hangry/default_recipe_parser.rb', line 3

def self.can_parse?(html)
  true
end

Instance Method Details

#parseObject



10
11
12
# File 'lib/hangry/default_recipe_parser.rb', line 10

def parse
  Recipe.new
end