Class: Generator

Inherits:
Object
  • Object
show all
Includes:
Stream
Defined in:
lib/generator2stream.rb

Overview

The generator is made a Stream by aliasing the methods at_end?, basic_forward, basic_peek, set_to_begin to the approriate methods #end?, #next, #peek and #rewind of the Generator class.

Be careful if you already use a version of Akinori MUSHAs generator.rb. Check out the version numbers of the one you use and the one comming with the stream package.

Instance Method Summary collapse

Methods included from Stream

#+, #at_beginning?, #backward, #collect, #concatenate, #concatenate_collected, #current, #current_edge, #each, #empty?, #filtered, #first, #forward, #last, #modify, #move_backward_until, #move_forward_until, #peek, #remove_first, #remove_last, #reverse, #set_to_end, #unwrapped

Instance Method Details

#create_streamObject

Returns the generator itself.



20
# File 'lib/generator2stream.rb', line 20

def create_stream; self; end