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.



106
107
108
109
# File 'lib/elastictastic/dirty.rb', line 106

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

Instance Method Details

#clone ⇒ Object



125
126
127
# File 'lib/elastictastic/dirty.rb', line 125

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