Class: Elastictastic::Dirty::NestedCollectionProxy

Inherits:
Array
  • Object
show all
Defined in:
lib/elastictastic/dirty.rb

Instance Method Summary collapse

Constructor Details

#initialize(owner, embed_name, collection = []) ⇒ NestedCollectionProxy

Returns a new instance of NestedCollectionProxy.


120
121
122
123
# File 'lib/elastictastic/dirty.rb', line 120

def initialize(owner, embed_name, collection = [])
  @owner, @embed_name = owner, embed_name
  super(collection)
end

Instance Method Details

#cloneObject


140
141
142
# File 'lib/elastictastic/dirty.rb', line 140

def clone
  NestedCollectionProxy.new(@owner, @embed_name, map { |el| el.clone })
end