Class: Chef::StreamingCookbookUploader::StreamPart
- Inherits:
-
Object
- Object
- Chef::StreamingCookbookUploader::StreamPart
- Defined in:
- lib/chef/streaming_cookbook_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.
126 127 128 |
# File 'lib/chef/streaming_cookbook_uploader.rb', line 126 def initialize(stream, size) @stream, @size = stream, size end |
Instance Method Details
#read(offset, how_much) ⇒ Object
read the specified amount from the stream
135 136 137 |
# File 'lib/chef/streaming_cookbook_uploader.rb', line 135 def read(offset, how_much) @stream.read(how_much) end |
#size ⇒ Object
130 131 132 |
# File 'lib/chef/streaming_cookbook_uploader.rb', line 130 def size @size end |