Class | Stream::ReversedStream |
In: |
lib/stream.rb
|
Parent: | WrappedStream |
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]