Class: Stream::EmptyStream
- Inherits:
-
BasicStream
- Object
- BasicStream
- Stream::EmptyStream
- 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
Instance Method Details
#at_beginning? ⇒ Boolean
180 181 182 |
# File 'lib/stream.rb', line 180 def at_beginning? true end |
#at_end? ⇒ Boolean
176 177 178 |
# File 'lib/stream.rb', line 176 def at_end? true end |
#basic_backward ⇒ Object
188 189 190 |
# File 'lib/stream.rb', line 188 def basic_backward raise EndOfStreamException end |
#basic_forward ⇒ Object
184 185 186 |
# File 'lib/stream.rb', line 184 def basic_forward raise EndOfStreamException end |