Class: Chef::CookbookSiteStreamingUploader::StringPart
- Defined in:
- lib/chef/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 startiung at the offset.
- #size ⇒ Object
Constructor Details
#initialize(str) ⇒ StringPart
Returns a new instance of StringPart.
186 187 188 |
# File 'lib/chef/cookbook_site_streaming_uploader.rb', line 186 def initialize(str) @str = str end |
Instance Method Details
#read(offset, how_much) ⇒ Object
read the specified amount from the string startiung at the offset
195 196 197 |
# File 'lib/chef/cookbook_site_streaming_uploader.rb', line 195 def read(offset, how_much) @str[offset, how_much] end |
#size ⇒ Object
190 191 192 |
# File 'lib/chef/cookbook_site_streaming_uploader.rb', line 190 def size @str.length end |