Parent

Methods

Class/Module Index [+]

Quicksearch

Array

Public Instance Methods

split(value = nil) click to toggle source

From rails

# File lib/rhc/core_ext.rb, line 28
def split(value = nil)
  using_block = block_given?

  inject([[]]) do |results, element|
    if (using_block && yield(element)) || (value == element)
      results << []
    else
      results.last << element
    end

    results
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.