Replicator (Class)

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

Factory singleton (think Star Trek) TODO maybe this belongs in the presenter file…

Methods

attach   create   find_food   get   new  

Attributes

cookbooks  [R] 
foods  [R] 
measures  [R] 

Included Modules

Singleton

Public Class methods

Public Instance methods

Attach to a dbh, e.g. one opened by the main program.

create a new <type> with the hash of <values> given.

cookbook:name
category:cookbook_id, name
recipe:name
ingredient:recipe_id, measure_id, quantity, food_id, modifier
food:name
measure:(nothing)

should this be a presenter function? If it were, we couldn’t make use of SQL…

get the <type> with id <id> from the database.

[Validate]