Flowdock
method

each_entry

Importance_1
each_entry(*args) public

Calls block once for each element in self, passing that element as a parameter, converting multiple values from yield to an array.

If no block is given, an enumerator is returned instead.

class Foo
  include Enumerable
  def each
    yield 1
    yield 1,2
  end
end
Foo.new.each_entry{|o| print o, " -- "}

produces:

1 -- [1, 2] --
Show source
Register or log in to add new notes.