hacks/with |
Public Methods |
Call the given block once for each object.
Example:
class Foo def foo; Kernel.puts "foo!"; end def puts(*args); Kernel.puts 'bar!'; end endf = Foo.new with(f) do foo #=> foo! puts 'foo' #=> bar! end
objects | a list of objects to be processed. |
---|---|
block | a block to be executed once for each object. |
Returns: the last value from the last call to instance_eval.
class WithDelegate < KernellessObject |
Public Methods |