Class: BinData::Rest
Overview
Rest will consume the input stream from the current position to the end of the stream. This will mainly be useful for debugging and developing.
require 'bindata'
class A < BinData::MultiValue
string :a, :read_length => 5
rest :rest
end
obj = A.read("abcdefghij")
obj.a #=> "abcde"
obj.rest #=" "fghij"
Method Summary
Methods inherited from Single
#_do_read, #_num_bytes, #_write, all_possible_field_names, #clear, #clear?, #done_read, #field_names, #initialize, #single_value?, #snapshot, #value, #value=
Methods inherited from Base
accepted_parameters, #clear, default_parameters, #do_read, #done_read, #field_names, #initialize, #inspect, lookup, mandatory_parameters, mutually_exclusive_parameters, #num_bytes, optional_parameters, #read, read, register, sanitize_parameters, #single_value?, #snapshot, #to_s, #write
Constructor Details
This class inherits a constructor from BinData::Single