Class: FoodIngredientParser::Strict::Grammar::NestedIngredientNode
- Inherits:
-
IngredientNode
- Object
- Treetop::Runtime::SyntaxNode
- SyntaxNode
- IngredientNode
- FoodIngredientParser::Strict::Grammar::NestedIngredientNode
- Defined in:
- lib/food_ingredient_parser/strict/nodes.rb
Overview
Ingredient with containing ingredients.
Instance Method Summary collapse
Instance Method Details
#to_h ⇒ Object
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 |