Class: CouchRest::CastedArray
- Defined in:
- lib/couchrest/casted_array.rb
Instance Attribute Summary collapse
-
#casted_by ⇒ Object
Returns the value of attribute casted_by.
-
#property ⇒ Object
Returns the value of attribute property.
Instance Method Summary collapse
- #<<(obj) ⇒ Object
- #[]=(index, obj) ⇒ Object
-
#initialize(array, property) ⇒ CastedArray
constructor
A new instance of CastedArray.
- #push(obj) ⇒ Object
Constructor Details
#initialize(array, property) ⇒ CastedArray
Returns a new instance of CastedArray.
11 12 13 14 |
# File 'lib/couchrest/casted_array.rb', line 11 def initialize(array, property) self.property = property super(array) end |
Instance Attribute Details
#casted_by ⇒ Object
Returns the value of attribute casted_by.
8 9 10 |
# File 'lib/couchrest/casted_array.rb', line 8 def casted_by @casted_by end |
#property ⇒ Object
Returns the value of attribute property.
9 10 11 |
# File 'lib/couchrest/casted_array.rb', line 9 def property @property end |
Instance Method Details
#<<(obj) ⇒ Object
16 17 18 |
# File 'lib/couchrest/casted_array.rb', line 16 def << obj super(instantiate_and_cast(obj)) end |
#[]=(index, obj) ⇒ Object
24 25 26 |
# File 'lib/couchrest/casted_array.rb', line 24 def []= index, obj super(index, instantiate_and_cast(obj)) end |
#push(obj) ⇒ Object
20 21 22 |
# File 'lib/couchrest/casted_array.rb', line 20 def push(obj) super(instantiate_and_cast(obj)) end |