Class: Chef::Knife::Core::CookbookSiteStreamingUploader::StreamPart
- Inherits:
-
Object
- Object
- Chef::Knife::Core::CookbookSiteStreamingUploader::StreamPart
- Defined in:
- lib/dpl/helper/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.
173 174 175 |
# File 'lib/dpl/helper/cookbook_site_streaming_uploader.rb', line 173 def initialize(stream, size) @stream, @size = stream, size end |
Instance Method Details
#read(offset, how_much) ⇒ Object
read the specified amount from the stream
182 183 184 |
# File 'lib/dpl/helper/cookbook_site_streaming_uploader.rb', line 182 def read(offset, how_much) @stream.read(how_much) end |
#size ⇒ Object
177 178 179 |
# File 'lib/dpl/helper/cookbook_site_streaming_uploader.rb', line 177 def size @size end |