Class: 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.
127 128 129 130 |
# File 'lib/chef/streaming_cookbook_uploader.rb', line 127 def initialize(stream, size) Chef::Log.warn('[DEPRECATED] StreamingCookbookUploader::StreamPart class is deprecated. It will be removed in Chef 12. Please use CookbookSiteStreamingUploader::StreamPart instead.') @stream, @size = stream, size end |
Instance Method Details
#read(offset, how_much) ⇒ Object
read the specified amount from the stream
137 138 139 |
# File 'lib/chef/streaming_cookbook_uploader.rb', line 137 def read(offset, how_much) @stream.read(how_much) end |
#size ⇒ Object
132 133 134 |
# File 'lib/chef/streaming_cookbook_uploader.rb', line 132 def size @size end |