Class: Parts::StreamParam

Inherits:
Object
  • Object
show all
Defined in:
lib/multi_part/parts.rb

Instance Method Summary collapse

Constructor Details

#initialize(stream, size) ⇒ StreamParam

Returns a new instance of StreamParam.



3
4
5
# File 'lib/multi_part/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/multi_part/parts.rb', line 11

def read(offset, how_much)
  @stream.read(how_much)
end

#sizeObject



7
8
9
# File 'lib/multi_part/parts.rb', line 7

def size
  @size
end