Module: BinData::ReadUntilEOFPlugin
- Defined in:
- lib/bindata/array.rb
Overview
Logic for the :read_until => :eof parameter
Instance Method Summary collapse
Instance Method Details
#do_read(io) ⇒ Object
311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/bindata/array.rb', line 311 def do_read(io) loop do element = append_new_element begin element.do_read(io) rescue EOFError, IOError elements.pop break end end end |