Sha256: 7e4ecf43ae00e49c404cfd57dee9079f91715bedfff10e52bc4df1d9b42f707e

Contents?: true

Size: 318 Bytes

Versions: 28

Compression:

Stored size: 318 Bytes

Contents

module DeadlySerious
  module Processes
    class Joiner
      def run(readers: [], writers: [])
        writer = writers.first
        until readers.all?(&:eof?)
          readers.each do |reader|
            line = reader.gets
            writer << line if line
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
deadly_serious-0.5.2 lib/deadly_serious/processes/joiner.rb
deadly_serious-0.5.1 lib/deadly_serious/processes/joiner.rb
deadly_serious-0.5.0 lib/deadly_serious/processes/joiner.rb
deadly_serious-0.4.1 lib/deadly_serious/processes/joiner.rb
deadly_serious-0.4.0 lib/deadly_serious/processes/joiner.rb
deadly_serious-0.3.0 lib/deadly_serious/processes/joiner.rb
deadly_serious-0.2.0 lib/deadly_serious/processes/joiner.rb
deadly_serious-0.1.0 lib/deadly_serious/processes/joiner.rb