def with_output
      super do |out|
        out.puts header
        @queued_write = []
        yield out
        @queued_write.sort.each do |line|
          out.puts(line)
        end
      end
    end
def with_output
      super do |out|
        out.puts header
        @queued_write = []
        yield out
        @queued_write.sort.each do |line|
          out.puts(line)
        end
      end
    end
def with_output super do | out | out . puts header @queued_write = [ ] yield out @queued_write . sort . each do | line | out . puts ( line ) end end end
prepend header and sort lines before closing output
prepend header and sort lines before closing output