Logic for the :until_valid parameter
# File lib/bindata/skip.rb, line 116 def read_and_return_value(io) prototype = get_parameter(:until_valid) validator = prototype.instantiate(nil, self) valid = false until valid begin io.with_readahead do validator.read(io) valid = true end rescue ValidityError io.readbytes(1) end end end
# File lib/bindata/skip.rb, line 111 def skip_length # no skipping when writing 0 end