Method: CollectionsFactory#copy

Defined in:
lib/test-factory/collections_factory.rb

#copyObject

Makes a “deep copy” of the Collection. See the #data_object_copy method description in the DataObject class for more information.



46
47
48
49
50
51
52
# File 'lib/test-factory/collections_factory.rb', line 46

def copy
  new_collection = self.class.new(@browser)
  self.each do |item|
    new_collection << item.data_object_copy
  end
  new_collection
end