Class | Ditz::ModelObject |
In: |
lib/model.rb
|
Parent: | Object |
fields | [R] | |
serialized_values | [R] | |
values | [R] |
creates the object, filling in fields from ‘vals’, and throwing a ModelError when it can‘t find all the requisite fields
creates the object, prompting the user when necessary. can take a :with => { hash } parameter for pre-filling model fields.
can also take a :defaults_from => obj parameter for pre-filling model fields from another object with (some of) those fields. kinda like a bizarre interactive copy constructor.
override these two to model per-field transformations between disk and memory.
convert disk form => memory form