Class: Helpers::StreamView

Inherits:
BaseStreamView show all
Defined in:
lib/file_data/helpers/stream_view.rb

Overview

View of a stream that ends when eof? is true

Instance Attribute Summary

Attributes inherited from BaseStreamView

#start_pos, #stream

Instance Method Summary collapse

Methods included from BinaryExtensions

#read_ascii, #read_value

Constructor Details

#initialize(stream) ⇒ StreamView

Returns a new instance of StreamView.



41
42
43
# File 'lib/file_data/helpers/stream_view.rb', line 41

def initialize(stream)
  super(stream, 0)
end

Instance Method Details

#eof?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/file_data/helpers/stream_view.rb', line 45

def eof?
  @stream.eof?
end