Ingredient (Class)

In: model/model.rb
Parent: Object
Category Food Recipe ObservableArray Measure Cookbook Ingredient Replicator Array Singleton Observable TopLevel

An ingredient is conceptually like "4 cups flour (sifted)". The "cups" part is a Measure, the "flour" part is a Food. The "(sifted)" part is the modifier.

Note that not all "4 cups flour (sifted)" are the same Ingredient object. It is simplest to allow this conceptual dupulication because that’s how humans think of it. (when you change a pancake recipe to use less flour, you don’t want to change your bread recipes too)

Methods

<=>   delete   food   food=   measure   measure=   modifier   modifier=   new   position   position=   quantity   quantity=   recipe   to_s  

Attributes

id  [R] 

Included Modules

Public Class methods

Public Instance methods

The position in the list of ingredients

[Validate]