Sha256: 15e4fed91bb9ce4cd5fa829c2b66ea97f6cd7f2e573623436652b3dcaf9dc834
Contents?: true
Size: 559 Bytes
Versions: 36
Compression:
Stored size: 559 Bytes
Contents
module Arql class MultiIO def initialize(*targets) @targets = targets end def write(*args) @targets.each do |t| if t.isatty t.write(*args) else t.write(*(args.map { |str| str.gsub(/\e\[(\d+)m/, '')})) end t.flush end end def close @targets.each(&:close) end def <<(target) @targets ||= [] @targets << target end def delete(io) @targets.delete(io) end def include?(io) @targets.include?(io) end end end
Version data entries
36 entries across 36 versions & 1 rubygems