Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/hacker_todo_list/extensions.rb
Instance Method Summary collapse
-
#delete_indexes(*index_array) ⇒ Object
Deletes the elements speicified at a particular index.
Instance Method Details
#delete_indexes(*index_array) ⇒ Object
Deletes the elements speicified at a particular index
3 4 5 6 7 8 |
# File 'lib/hacker_todo_list/extensions.rb', line 3 def delete_indexes(*index_array) [index_array].flatten.each do |index| self[index] = nil end self.compact end |