Class: Pakyow::Logger::Multiplexed
- Inherits:
-
Object
- Object
- Pakyow::Logger::Multiplexed
- Defined in:
- lib/pakyow/logger/multiplexed.rb
Instance Attribute Summary collapse
-
#destinations ⇒ Object
readonly
Returns the value of attribute destinations.
Instance Method Summary collapse
- #call(entry) ⇒ Object
-
#initialize(*destinations) ⇒ Multiplexed
constructor
A new instance of Multiplexed.
Constructor Details
#initialize(*destinations) ⇒ Multiplexed
Returns a new instance of Multiplexed.
8 9 10 |
# File 'lib/pakyow/logger/multiplexed.rb', line 8 def initialize(*destinations) @destinations = destinations end |
Instance Attribute Details
#destinations ⇒ Object (readonly)
Returns the value of attribute destinations.
6 7 8 |
# File 'lib/pakyow/logger/multiplexed.rb', line 6 def destinations @destinations end |
Instance Method Details
#call(entry) ⇒ Object
12 13 14 15 16 |
# File 'lib/pakyow/logger/multiplexed.rb', line 12 def call(entry) @destinations.each do |destination| destination.call(entry) end end |