Class: StreamingUploader::StringPart

Inherits:
Object
  • Object
show all
Defined in:
lib/abicli/commands/upload-template.rb

Instance Method Summary collapse

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

#sizeObject



89
90
91
# File 'lib/abicli/commands/upload-template.rb', line 89

def size
  @str.length
end