Class: ActiveRecord::TablelessModel
- Inherits:
-
Hash
- Object
- Hash
- ActiveRecord::TablelessModel
- Extended by:
- Tableless::ClassMethods
- Includes:
- Tableless::InstanceMethods, Validatable
- Defined in:
- lib/tableless_model.rb
Overview
TablelessModel class is basically an Hash with method-like keys that must be defined in advance as for an ActiveRecord model, but without a table. Trying to set new keys not defined at class level result in NoMethodError raised
Class Attribute Summary collapse
-
.attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Attribute Summary collapse
-
#__owner_object ⇒ Object
Returns the value of attribute __owner_object.
-
#__serialized_attribute ⇒ Object
Returns the value of attribute __serialized_attribute.
Method Summary
Methods included from Tableless::ClassMethods
Methods included from Tableless::InstanceMethods
#[], #[]=, #initialize, #inspect, #merge, #method_missing, #respond_to?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Tableless::InstanceMethods
Class Attribute Details
.attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
37 38 39 |
# File 'lib/tableless_model.rb', line 37 def attributes @attributes end |
Instance Attribute Details
#__owner_object ⇒ Object
Returns the value of attribute __owner_object.
27 28 29 |
# File 'lib/tableless_model.rb', line 27 def __owner_object @__owner_object end |
#__serialized_attribute ⇒ Object
Returns the value of attribute __serialized_attribute.
27 28 29 |
# File 'lib/tableless_model.rb', line 27 def __serialized_attribute @__serialized_attribute end |