Class: Stream::EmptyStream

Inherits:
BasicStream show all
Includes:
Singleton
Defined in:
lib/stream.rb

Overview

A Singleton class for an empty stream. EmptyStream.instance is the sole instance which answers true for both at_end? and at_beginning?

Instance Method Summary collapse

Methods included from Stream

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

Methods included from Enumerable

#create_stream

Instance Method Details

#at_beginning?Boolean

Returns:

  • (Boolean)

135
# File 'lib/stream.rb', line 135

def at_beginning?; true; end

#at_end?Boolean

Returns:

  • (Boolean)

134
# File 'lib/stream.rb', line 134

def at_end?; true; end