class Tychus::Parsers::AllrecipesParser
Public Class Methods
uri_host()
click to toggle source
# File lib/tychus/parsers/allrecipes_parser.rb, line 5 def self.uri_host "allrecipes.com" end
Public Instance Methods
parse_ingredients()
click to toggle source
# File lib/tychus/parsers/allrecipes_parser.rb, line 15 def parse_ingredients # NOT FIRST recipe_doc .css('[itemprop="ingredients"]') .map do |ingredient_node| ingredient_node .element_children .map(&:content) .join(" ") end.reject(&:blank?) end
parse_recipe_instructions()
click to toggle source
Calls superclass method
# File lib/tychus/parsers/allrecipes_parser.rb, line 9 def parse_recipe_instructions #reject last "Kitchen Friendly View" element instructions = super instructions[0..-2] end