Class: Cequel::Model::InstanceInternals
- Inherits:
-
Object
- Object
- Cequel::Model::InstanceInternals
- Defined in:
- lib/cequel/model/instance_internals.rb
Instance Attribute Summary collapse
-
#associations ⇒ Object
readonly
Returns the value of attribute associations.
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#key ⇒ Object
Returns the value of attribute key.
-
#persisted ⇒ Object
Returns the value of attribute persisted.
Instance Method Summary collapse
-
#initialize(instance) ⇒ InstanceInternals
constructor
A new instance of InstanceInternals.
Constructor Details
#initialize(instance) ⇒ InstanceInternals
Returns a new instance of InstanceInternals.
13 14 15 16 17 |
# File 'lib/cequel/model/instance_internals.rb', line 13 def initialize(instance) @instance = instance @attributes = ActiveSupport::HashWithIndifferentAccess.new @associations = {} end |
Instance Attribute Details
#associations ⇒ Object (readonly)
Returns the value of attribute associations.
11 12 13 |
# File 'lib/cequel/model/instance_internals.rb', line 11 def associations @associations end |
#attributes ⇒ Object
Returns the value of attribute attributes.
10 11 12 |
# File 'lib/cequel/model/instance_internals.rb', line 10 def attributes @attributes end |
#key ⇒ Object
Returns the value of attribute key.
10 11 12 |
# File 'lib/cequel/model/instance_internals.rb', line 10 def key @key end |
#persisted ⇒ Object
Returns the value of attribute persisted.
10 11 12 |
# File 'lib/cequel/model/instance_internals.rb', line 10 def persisted @persisted end |