method

new

Importance_1
v1_8_6_287 - Show latest stable - 0 notes - Class: Generator
new(enum = nil, &block) public

Creates a new generator either from an Enumerable object or from a block.

In the former, block is ignored even if given.

In the latter, the given block is called with the generator itself, and expected to call the yield method for each element.

Show source
Register or log in to add new notes.