Class: StreamingUploader::StreamPart

Inherits:
Object
  • Object
show all
Defined in:
lib/abicli/commands/upload-template.rb

Instance Method Summary collapse

Constructor Details

#initialize(stream, size) ⇒ StreamPart

Returns a new instance of StreamPart.



70
71
72
# File 'lib/abicli/commands/upload-template.rb', line 70

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

Instance Method Details

#read(offset, how_much) ⇒ Object

read the specified amount from the stream



79
80
81
# File 'lib/abicli/commands/upload-template.rb', line 79

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

#sizeObject



74
75
76
# File 'lib/abicli/commands/upload-template.rb', line 74

def size
  @size
end