Sha256: bd7302c0d4d17e3fbe4c2ae160dc1c959eba3a5cdc978675fb484246f1abe8c4

Contents?: true

Size: 298 Bytes

Versions: 15

Compression:

Stored size: 298 Bytes

Contents

module Arql
  class MultiIO
    def initialize(*targets)
      @targets = targets
    end

    def write(*args)
      @targets.each {|t| t.write(*args)}
    end

    def close
      @targets.each(&:close)
    end

    def <<(target)
      @targets ||= []
      @targets << target
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
arql-0.1.15 lib/arql/multi_io.rb
arql-0.1.14 lib/arql/multi_io.rb
arql-0.1.13 lib/arql/multi_io.rb
arql-0.1.12 lib/arql/multi_io.rb
arql-0.1.11 lib/arql/multi_io.rb
arql-0.1.10 lib/arql/multi_io.rb
arql-0.1.9 lib/arql/multi_io.rb
arql-0.1.8 lib/arql/multi_io.rb
arql-0.1.7 lib/arql/multi_io.rb
arql-0.1.6 lib/arql/multi_io.rb
arql-0.1.5 lib/arql/multi_io.rb
arql-0.1.4 lib/arql/multi_io.rb
arql-0.1.3 lib/arql/multi_io.rb
arql-0.1.2 lib/arql/multi_io.rb
arql-0.1.1 lib/arql/multi_io.rb