Class Ditz::ModelObject
In: lib/model.rb
Parent: Object

Methods

Classes and Modules

Class Ditz::ModelObject::ModelError

Attributes

fields  [R] 
serialized_values  [R] 
values  [R] 

Public Class methods

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.

add a new field to a model object

yamlability

Public Instance methods

override these two to model per-field transformations between disk and memory.

convert disk form => memory form

depth-first search on all reachable ModelObjects. fuck yeah.

convert memory form => disk form

[Validate]