aggregator/disk.rb
## Pulls the next line, if available, and
#   returns it to the aggregator.
# If there isn't another line, go to the next file.
# @returns {String} - the next line in the current file
Pulls the next line, if available, and
returns it to the aggregator.
If there isn't another line, go to the next file.
Pulls the next line if available and returns it to the aggregator . If there isn ' t another line go to the next file .
def read
    line = '-'
    loop do
      next_file if @data.empty?
      line = @data.shift&.strip
      break unless line.empty?
    end
    line
  end
def read line = '-' loop do next_file if @data . empty? line = @data . shift &. strip break unless line . empty? end line end
Pulls the next line, if available, and
returns it to the aggregator.
Pulls the next line if available and returns it to the aggregator .
{String} - the next line in the current file
{ String } - the next line in the current file