Sha256: c71740e1db65ca98218de1f118177078ab48c4787a735e49160fcea74f3133bb

Contents?: true

Size: 288 Bytes

Versions: 5

Compression:

Stored size: 288 Bytes

Contents

module DeadlySerious
  module Processes
    class Splitter
      def run(readers: [], writers: [])
        reader = readers.first
        outputs = writers.dup
        reader.each do |line|
          outputs.first << line
          outputs.rotate!
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
deadly_serious-0.4.1 lib/deadly_serious/processes/splitter.rb
deadly_serious-0.4.0 lib/deadly_serious/processes/splitter.rb
deadly_serious-0.3.0 lib/deadly_serious/processes/splitter.rb
deadly_serious-0.2.0 lib/deadly_serious/processes/splitter.rb
deadly_serious-0.1.0 lib/deadly_serious/processes/splitter.rb