Class: MultiIO

Inherits:
Object show all
Defined in:
ext/extconf.rb

Overview

Util allowing proxying writes to multiple location

Instance Method Summary collapse

Constructor Details

#initialize(*targets) ⇒ MultiIO

Returns a new instance of MultiIO.



42
43
44
# File 'ext/extconf.rb', line 42

def initialize(*targets)
  @targets = targets
end

Instance Method Details

#closeObject



50
51
52
# File 'ext/extconf.rb', line 50

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

#write(*args) ⇒ Object



46
47
48
# File 'ext/extconf.rb', line 46

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