Class: Cloudreach::MultiIO

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudreach-logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(*targets) ⇒ MultiIO

Returns a new instance of MultiIO.



24
25
26
# File 'lib/cloudreach-logger.rb', line 24

def initialize(*targets)
  @targets = targets
end

Instance Method Details

#closeObject



34
35
36
# File 'lib/cloudreach-logger.rb', line 34

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

#write(*args) ⇒ Object



28
29
30
31
32
# File 'lib/cloudreach-logger.rb', line 28

def write(*args)
  @targets.each do |target|
    target.write(*args)
  end
end