Class: LogStashLogger::Device::MultiDelegator

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash-logger/device/multi_delegator.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#io, #sync

Instance Method Summary collapse

Methods inherited from Base

#close, #flush, #to_io, #write

Constructor Details

#initialize(opts) ⇒ MultiDelegator

Returns a new instance of MultiDelegator.



11
12
13
14
15
# File 'lib/logstash-logger/device/multi_delegator.rb', line 11

def initialize(opts)
  @io = self
  @devices = create_devices(opts[:outputs])
  self.class.delegate(:write, :close, :flush)
end

Instance Attribute Details

#devicesObject (readonly)

Returns the value of attribute devices.



9
10
11
# File 'lib/logstash-logger/device/multi_delegator.rb', line 9

def devices
  @devices
end