Class: PKGWizard::StreamingUploader::StringPart
- Inherits:
-
Object
- Object
- PKGWizard::StreamingUploader::StringPart
- Defined in:
- lib/pkg-wizard/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.
81 82 83 |
# File 'lib/pkg-wizard/streaming_uploader.rb', line 81 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
90 91 92 |
# File 'lib/pkg-wizard/streaming_uploader.rb', line 90 def read(offset, how_much) @str[offset, how_much] end |
#size ⇒ Object
85 86 87 |
# File 'lib/pkg-wizard/streaming_uploader.rb', line 85 def size @str.length end |