Method: Insertion#initialize

Defined in:
lib/yard/core_ext/insertion.rb

#initialize(list, value) ⇒ Insertion

Creates an insertion object on a list with a value to be inserted. To finalize the insertion, call #before or #after on the object.

Parameters:

  • list (Array)

    the list to perform the insertion on

  • value (Object)

    the value to insert



13
# File 'lib/yard/core_ext/insertion.rb', line 13

def initialize(list, value) @list, @values = list, (Array === value ? value : [value]) end