Class: StreamingUploader::StringPart
- Inherits:
-
Object
- Object
- StreamingUploader::StringPart
- Defined in:
- lib/abicli/commands/upload-template.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.
85 86 87 |
# File 'lib/abicli/commands/upload-template.rb', line 85 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
94 95 96 |
# File 'lib/abicli/commands/upload-template.rb', line 94 def read(offset, how_much) @str[offset, how_much] end |
#size ⇒ Object
89 90 91 |
# File 'lib/abicli/commands/upload-template.rb', line 89 def size @str.length end |