Class: Parts::StreamParam
- Inherits:
-
Object
- Object
- Parts::StreamParam
- Defined in:
- lib/parts.rb
Instance Method Summary collapse
-
#initialize(stream, size) ⇒ StreamParam
constructor
A new instance of StreamParam.
- #read(offset, how_much) ⇒ Object
- #size ⇒ Object
Constructor Details
#initialize(stream, size) ⇒ StreamParam
Returns a new instance of StreamParam.
3 4 5 |
# File 'lib/parts.rb', line 3 def initialize(stream, size) @stream, @size = stream, size end |
Instance Method Details
#read(offset, how_much) ⇒ Object
11 12 13 |
# File 'lib/parts.rb', line 11 def read(offset, how_much) @stream.read(how_much) end |
#size ⇒ Object
7 8 9 |
# File 'lib/parts.rb', line 7 def size @size end |