Class: Cloudreach::MultiIO
- Inherits:
-
Object
- Object
- Cloudreach::MultiIO
- Defined in:
- lib/cloudreach-logger.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(*targets) ⇒ MultiIO
constructor
A new instance of MultiIO.
- #write(*args) ⇒ Object
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
#close ⇒ Object
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 |