Class: FoodIngredientParser::Strict::Grammar::NestedIngredientNode

Inherits:
IngredientNode
  • Object
show all
Defined in:
lib/food_ingredient_parser/strict/nodes.rb

Overview

Ingredient with containing ingredients.

Instance Method Summary collapse

Instance Method Details

#to_hObject



57
58
59
# File 'lib/food_ingredient_parser/strict/nodes.rb', line 57

def to_h
  super.merge({ contains: to_a_deep(contains, IngredientNode).map(&:to_h) })
end