class 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
Public Class Methods
Source
# File lib/stream.rb 304 def initialize(other_stream) 305 @wrapped_stream = other_stream 306 end
Create a new WrappedStream
wrapping the Stream
other_stream.
Public Instance Methods
Source
# File lib/stream.rb 308 def at_beginning? 309 @wrapped_stream.at_beginning? 310 end
Source
# File lib/stream.rb 333 def basic_backward 334 @wrapped_stream.basic_backward 335 end
Source
# File lib/stream.rb 329 def basic_forward 330 @wrapped_stream.basic_forward 331 end
Source
# File lib/stream.rb 320 def set_to_begin 321 @wrapped_stream.set_to_begin 322 end
Source
# File lib/stream.rb 325 def unwrapped 326 @wrapped_stream.unwrapped 327 end
Returns the wrapped stream unwrapped.