Module Kernel
In: lib/active_support/core_ext/kernel.rb

Methods

returning  

Public Instance methods

A Ruby-ized realization of the K combinator, courtesy of Mikael Brockman.

  def foo
    returning values = [] do
      values << 'bar'
      values << 'baz'
    end
  end

  foo # => ['bar', 'baz']

[Validate]