Each reversable stream (a stream that implements backward and at_beginning?) can be wrapped by a ReversedStream.
A ReversedStream is created by the method reverse:
(1..6).create_stream.reverse.to_a ==> [6, 5, 4, 3, 2, 1]
Returns true if the wrapped stream is at_end?.
# File lib/stream.rb, line 317 def at_beginning?; wrapped_stream.at_end?; end
Returns true if the wrapped stream is at_beginning?.
# File lib/stream.rb, line 319 def at_end?; wrapped_stream.at_beginning?; end
Moves the wrapped stream one step forward.
# File lib/stream.rb, line 324 def basic_backward; wrapped_stream.basic_forward; end
Moves the wrapped stream one step backward.
# File lib/stream.rb, line 322 def basic_forward; wrapped_stream.basic_backward; end
Generated with the Darkfish Rdoc Generator 2.