Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/slim_form_object/extensions.rb

Instance Method Summary collapse

Instance Method Details

#iterate_with_each_pairObject



3
4
5
6
7
8
9
10
# File 'lib/slim_form_object/extensions.rb', line 3

def iterate_with_each_pair
  cloned_objects = Array.new(self)
  while object_1 = cloned_objects.delete(cloned_objects[0])
    cloned_objects.each do |object_2|
      yield(object_1, object_2)
    end
  end
end