Sha256: aa1220838b19a8073b48023c0791d31023fb364c508054baf370f8cef0815634

Contents?: true

Size: 578 Bytes

Versions: 9

Compression:

Stored size: 578 Bytes

Contents

class Array
  # Places values before or after another object (by value) in
  # an array. This is used in tandem with the before and after
  # methods of the {Insertion} class.
  # 
  # @example Places an item before another
  #   [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3]
  # @example Places an item after another
  #   [:a, :b, :c].place(:x).after(:a) # => [:a, :x, :b, :c]
  # @param [Array] values value to insert
  # @return [Insertion] an insertion object to 
  # @see Insertion#before
  # @see Insertion#after
  def place(*values) Insertion.new(self, values) end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
yard-0.6.8 lib/yard/core_ext/array.rb
yard-0.6.7 lib/yard/core_ext/array.rb
yard-0.6.6 lib/yard/core_ext/array.rb
yard-0.6.5 lib/yard/core_ext/array.rb
yard-0.6.4 lib/yard/core_ext/array.rb
yard-0.6.3 lib/yard/core_ext/array.rb
yard-0.6.2 lib/yard/core_ext/array.rb
yard-0.6.1 lib/yard/core_ext/array.rb
yard-0.6.0 lib/yard/core_ext/array.rb