Class: CouchRest::CastedArray

Inherits:
Array
  • Object
show all
Defined in:
lib/couchrest/casted_array.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#casted_byObject

Returns the value of attribute casted_by.



8
9
10
# File 'lib/couchrest/casted_array.rb', line 8

def casted_by
  @casted_by
end

Instance Method Details

#<<(obj) ⇒ Object



10
11
12
13
# File 'lib/couchrest/casted_array.rb', line 10

def << obj
  obj.casted_by = self.casted_by if obj.respond_to?(:casted_by)
  super(obj)
end

#[]=(index, obj) ⇒ Object



20
21
22
23
# File 'lib/couchrest/casted_array.rb', line 20

def []= index, obj
  obj.casted_by = self.casted_by if obj.respond_to?(:casted_by)
  super(index, obj)
end

#push(obj) ⇒ Object



15
16
17
18
# File 'lib/couchrest/casted_array.rb', line 15

def push(obj)
  obj.casted_by = self.casted_by if obj.respond_to?(:casted_by)
  super(obj)
end