singleton method Generator.new
new(enum = nil) -> Generator
new(enum = nil) {|g| ... } -> Generator
-
Enumerable オブジェクトかブロックから Generator オブジェクトを生成します。
ブロックは生成した Generator オブジェクトをブロック引数として呼ばれます。
- [PARAM] enum:
- Enumerable をインクルードしたオブジェクトを与えます。 enum とブロックを同時に与えた場合は、ブロックは無視されます。
class Generator