Class: FileFM::StreamingUploader::StreamPart

Inherits:
Object
  • Object
show all
Defined in:
lib/filefm/streaming_uploader.rb

Instance Method Summary collapse

Constructor Details

#initialize(stream, size) ⇒ StreamPart

Returns a new instance of StreamPart.



76
77
78
# File 'lib/filefm/streaming_uploader.rb', line 76

def initialize(stream, size)
  @stream, @size = stream, size
end

Instance Method Details

#read(offset, how_much) ⇒ Object

read the specified amount from the stream



85
86
87
# File 'lib/filefm/streaming_uploader.rb', line 85

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

#sizeObject



80
81
82
# File 'lib/filefm/streaming_uploader.rb', line 80

def size
  @size
end