Method: Array#move_object

Defined in:
lib/factoryform/utils.rb

#move_object(obj, to) ⇒ Object



6
7
8
9
# File 'lib/factoryform/utils.rb', line 6

def move_object(obj, to)
  return self if index(obj).nil? # return original array if obj not found
  move(index(obj), to)
end