Class: Chef::CookbookSiteStreamingUploader::StreamPart
- Defined in:
- lib/chef/cookbook_site_streaming_uploader.rb
Instance Method Summary collapse
-
#initialize(stream, size) ⇒ StreamPart
constructor
A new instance of StreamPart.
-
#read(offset, how_much) ⇒ Object
read the specified amount from the stream.
- #size ⇒ Object
Constructor Details
#initialize(stream, size) ⇒ StreamPart
Returns a new instance of StreamPart.
171 172 173 |
# File 'lib/chef/cookbook_site_streaming_uploader.rb', line 171 def initialize(stream, size) @stream, @size = stream, size end |
Instance Method Details
#read(offset, how_much) ⇒ Object
read the specified amount from the stream
180 181 182 |
# File 'lib/chef/cookbook_site_streaming_uploader.rb', line 180 def read(offset, how_much) @stream.read(how_much) end |
#size ⇒ Object
175 176 177 |
# File 'lib/chef/cookbook_site_streaming_uploader.rb', line 175 def size @size end |