Class: Chef::Knife::Core::CookbookSiteStreamingUploader::StringPart
- Inherits:
-
Object
- Object
- Chef::Knife::Core::CookbookSiteStreamingUploader::StringPart
- Defined in:
- lib/dpl/helper/cookbook_site_streaming_uploader.rb
Instance Method Summary collapse
-
#initialize(str) ⇒ StringPart
constructor
A new instance of StringPart.
-
#read(offset, how_much) ⇒ Object
read the specified amount from the string starting at the offset.
- #size ⇒ Object
Constructor Details
#initialize(str) ⇒ StringPart
Returns a new instance of StringPart.
188 189 190 |
# File 'lib/dpl/helper/cookbook_site_streaming_uploader.rb', line 188 def initialize(str) @str = str end |
Instance Method Details
#read(offset, how_much) ⇒ Object
read the specified amount from the string starting at the offset
197 198 199 |
# File 'lib/dpl/helper/cookbook_site_streaming_uploader.rb', line 197 def read(offset, how_much) @str[offset, how_much] end |
#size ⇒ Object
192 193 194 |
# File 'lib/dpl/helper/cookbook_site_streaming_uploader.rb', line 192 def size @str.length end |