Method: Bogo::Stack#insert_after

Defined in:
lib/bogo/stack.rb

#insert_after(idx: nil, callable: nil, &block) ⇒ self

Insert item after given index

Parameters:

  • idx (Integer) (defaults to: nil)

    index to add item after

  • callable (Class, Proc) (defaults to: nil)

    object that responds to #call or class with #call instance method

Returns:

  • (self)


624
625
626
# File 'lib/bogo/stack.rb', line 624

def insert_after(idx: nil, callable: nil, &block)
  insert(idx: idx, callable: callable, adjust: -1, &block)
end