Class: Stream::WrappedStream

### Home Classes Methods

### In Files

- lib/stream.rb

### Parent

Stream::BasicStream

### Methods

- ::new
- #at_beginning?
- #at_end?
- #basic_backward
- #basic_forward
- #set_to_begin
- #set_to_end
- #unwrapped

### Class/Module Index

Quicksearch

- Stream
- Stream::BasicStream
- Stream::CollectionStream
- Stream::ConcatenatedStream
- Stream::EmptyStream
- Stream::EndOfStreamException
- Stream::FilteredStream
- Stream::ImplicitStream
- Stream::IntervalStream
- Stream::MappedStream
- Stream::ReversedStream
- Stream::WrappedStream
- Array
- Enumerable
- Generator
- Object

No matching classes.

# Stream::WrappedStream

Class WrappedStream is the abstract superclass for stream classes that wrap another stream. The basic methods are simple delegated to the wrapped stream. Thus creating a WrappedStream on a CollectionStream would yield an equivalent stream:

    arrayStream = [1,2,3].create_stream

    arrayStream.to_a => [1,2,3]
    Stream::WrappedStream.new(arrayStream).to_a => [1,2,3]

### Attributes

wrapped_stream[R]

### Public Class Methods

new(otherStream) click to toggle source

Create a new WrappedStream wrapping the Stream otherStream.

    # File lib/stream.rb, line 214
    def initialize (otherStream)
      @wrapped_stream = otherStream
    end

### Public Instance Methods

at_beginning?() click to toggle source

    # File lib/stream.rb, line 218
    def at_beginning?; @wrapped_stream.at_beginning?; end

at_end?() click to toggle source

    # File lib/stream.rb, line 219
    def at_end?; @wrapped_stream.at_end?; end

basic_backward() click to toggle source

    # File lib/stream.rb, line 229
    def basic_backward;  @wrapped_stream.basic_backward; end

basic_forward() click to toggle source

    # File lib/stream.rb, line 228
    def basic_forward; @wrapped_stream.basic_forward; end

set_to_begin() click to toggle source

    # File lib/stream.rb, line 222
    def set_to_begin; @wrapped_stream.set_to_begin; end

set_to_end() click to toggle source

    # File lib/stream.rb, line 221
    def set_to_end; @wrapped_stream.set_to_end; end

unwrapped() click to toggle source

Returns the wrapped stream unwrapped.

    # File lib/stream.rb, line 225
    def unwrapped; @wrapped_stream.unwrapped; end

[Validate]

Generated with the Darkfish Rdoc Generator 2.