Class: Ms::Data::LazyString
Overview
LazyString is a LazyIO initialized from a string, which is converted into a StringIO.
Constant Summary
Constants inherited from LazyIO
Ms::Data::LazyIO::BASE_64, Ms::Data::LazyIO::LITTLE_ENDIAN_DOUBLE, Ms::Data::LazyIO::LITTLE_ENDIAN_FLOAT, Ms::Data::LazyIO::NETWORK_DOUBLE, Ms::Data::LazyIO::NETWORK_FLOAT
Instance Attribute Summary
Attributes inherited from LazyIO
#compressed, #decode_format, #io, #num_bytes, #start_index, #unpack_format
Instance Method Summary collapse
-
#initialize(string, unpack_format = NETWORK_FLOAT, compression = false, decode_format = BASE_64) ⇒ LazyString
constructor
A new instance of LazyString.
Methods inherited from LazyIO
#reset, #string, #to_a, unpack_code
Constructor Details
#initialize(string, unpack_format = NETWORK_FLOAT, compression = false, decode_format = BASE_64) ⇒ LazyString
Returns a new instance of LazyString.
10 11 12 |
# File 'lib/ms/data/lazy_string.rb', line 10 def initialize(string, unpack_format=NETWORK_FLOAT, compression=false, decode_format=BASE_64) super(StringIO.new(string), 0, string.length, unpack_format, compression, decode_format) end |