module BinData::ReadUntilPlugin

Logic for the :read_until parameter

Public Instance Methods

do_read(io) click to toggle source
# File lib/bindata/array.rb, line 299
def do_read(io)
  loop do
    element = append_new_element
    element.do_read(io)
    variables = { :index => self.length - 1, :element => self.last,
                  :array => self }
    break if eval_parameter(:read_until, variables)
  end
end