Class: LogStashLogger::Device::Balancer
- Defined in:
- lib/logstash-logger/device/balancer.rb
Instance Attribute Summary collapse
-
#devices ⇒ Object
readonly
Returns the value of attribute devices.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(opts) ⇒ Balancer
constructor
A new instance of Balancer.
Methods inherited from Base
#close, #flush, #to_io, #write
Constructor Details
#initialize(opts) ⇒ Balancer
Returns a new instance of Balancer.
6 7 8 9 10 11 |
# File 'lib/logstash-logger/device/balancer.rb', line 6 def initialize(opts) @io = self @devices = create_devices(opts[:outputs]) self.class.delegate_to_all(:close, :flush) self.class.delegate_to_one(:write) end |
Instance Attribute Details
#devices ⇒ Object (readonly)
Returns the value of attribute devices.
4 5 6 |
# File 'lib/logstash-logger/device/balancer.rb', line 4 def devices @devices end |