Sha256: 1ac9e013e4341afb2bfc27b42045ffd1608dedfde7053f073770f22477287671

Contents?: true

Size: 267 Bytes

Versions: 26

Compression:

Stored size: 267 Bytes

Contents

# frozen_string_literal: true

require 'bundler/setup'
require 'polyphony'

chunk_size = 1 << 16
file_path = ARGV[0]

File.open(file_path, 'w+') do |f|
  loop do
    len = IO.tee(STDIN, STDOUT, chunk_size)
    break if len == 0
    IO.splice(STDIN, f, len)
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
polyphony-1.6 examples/pipes/tee.rb
polyphony-1.5 examples/pipes/tee.rb
polyphony-1.4 examples/pipes/tee.rb
polyphony-1.3 examples/pipes/tee.rb
polyphony-1.2.1 examples/pipes/tee.rb
polyphony-1.2 examples/pipes/tee.rb
polyphony-1.1.1 examples/pipes/tee.rb
polyphony-1.1 examples/pipes/tee.rb
polyphony-1.0.2 examples/pipes/tee.rb
polyphony-1.0.1 examples/pipes/tee.rb
polyphony-1.0 examples/pipes/tee.rb
polyphony-0.99.6 examples/pipes/tee.rb
polyphony-0.99.5 examples/pipes/tee.rb
polyphony-0.99.4 examples/pipes/tee.rb
polyphony-0.99.3 examples/pipes/tee.rb
polyphony-0.99.2 examples/pipes/tee.rb
polyphony-0.99.1 examples/pipes/tee.rb
polyphony-0.99 examples/pipes/tee.rb
polyphony-0.98 examples/pipes/tee.rb
polyphony-0.97 examples/pipes/tee.rb