Module: FoodIngredientParser::Strict::ToHtml

Included in:
Grammar::RootNode
Defined in:
lib/food_ingredient_parser/strict/to_html.rb

Instance Method Summary collapse

Instance Method Details

#to_htmlString

Markup original ingredients list text in HTML.

The input text is returned as HTML, augmented with CSS classes on spans for name, amount, mark and note.

Returns:

  • (String)

    HTML representation of ingredient list.



16
17
18
# File 'lib/food_ingredient_parser/strict/to_html.rb', line 16

def to_html
  node_to_html(self)
end