Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/baselibmods.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#insert_after(idx, item) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/baselibmods.rb', line 9 def insert_after idx, item if idx == -1 self << item else after = slice! idx..length push << item concat after unless after.nil? end end |