Class: GrapeLogging::MultiIO

Inherits:
Object
  • Object
show all
Defined in:
lib/grape_logging/multi_io.rb

Instance Method Summary collapse

Constructor Details

#initialize(*targets) ⇒ MultiIO

Returns a new instance of MultiIO.


3
4
5
# File 'lib/grape_logging/multi_io.rb', line 3

def initialize(*targets)
  @targets = targets
end

Instance Method Details

#closeObject


11
12
13
# File 'lib/grape_logging/multi_io.rb', line 11

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

#write(*args) ⇒ Object


7
8
9
# File 'lib/grape_logging/multi_io.rb', line 7

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