Method: Xcodeproj::Project::ObjectList#move
- Defined in:
- lib/xcodeproj/project/object_list.rb
#move(object, new_index) ⇒ void
This method returns an undefined value.
Moves the given object to the given index.
153 154 155 156 157 158 159 160 |
# File 'lib/xcodeproj/project/object_list.rb', line 153 def move(object, new_index) return if index(object) == new_index if obj = delete(object) insert(new_index, obj) else raise "Attempt to move object `#{object}` not present in the list `#{inspect}`" end end |