Method: Vedeu::Editor::Delete#delete
- Defined in:
- lib/vedeu/editor/delete.rb
#delete ⇒ Vedeu::Editor::Line|Vedeu::Editor::Lines
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 38 39 |
# File 'lib/vedeu/editor/delete.rb', line 34 def delete return collection if collection.empty? || negative_index? return collection.dup.tap { |c| c.slice!(index) } if index return collection.dup.tap(&:pop) if lines? return collection.chop if line? end |