Method: Bcat::Reader#each
- Defined in:
- lib/bcat/reader.rb
#each ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/bcat/reader.rb', line 35 def each yield @buf.shift while @buf.any? while fd = fds.first fds.shift and next if fd.closed? fd.sync = true begin while buf = fd.readpartial(4096) yield buf end rescue EOFError fd.close end fds.shift end end |