Module: SuperModel::Marshal::Model
- Defined in:
- lib/supermodel/marshal.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
58 59 60 61 |
# File 'lib/supermodel/marshal.rb', line 58 def self.included(base) base.extend ClassMethods Marshal.klasses << base end |
Instance Method Details
#marshal_dump ⇒ Object
63 64 65 |
# File 'lib/supermodel/marshal.rb', line 63 def marshal_dump serializable_hash(self.class.marshal) end |
#marshal_load(atts) ⇒ Object
67 68 69 70 71 72 |
# File 'lib/supermodel/marshal.rb', line 67 def marshal_load(atts) # Can't call load, since class # isn't setup properly @attributes = atts.with_indifferent_access @changed_attributes = {} end |