Sha256: 57ef44b542d8e08a6ed3317993af86d70d3cfc7c5665091a7f078897b7515ce2
Contents?: true
Size: 669 Bytes
Versions: 18
Compression:
Stored size: 669 Bytes
Contents
require "bindata/base_primitive" module BinData # 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::Record # string :a, read_length: 5 # rest :rest # end # # obj = A.read("abcdefghij") # obj.a #=> "abcde" # obj.rest #=" "fghij" # class Rest < BinData::BasePrimitive #--------------- private def value_to_binary_string(val) val end def read_and_return_value(io) io.read_all_bytes end def sensible_default "" end end end
Version data entries
18 entries across 18 versions & 1 rubygems