Class: MultiDelegator
- Inherits:
-
Object
- Object
- MultiDelegator
- Defined in:
- lib/openstudio/workflow/multi_delegator.rb
Overview
Class to allow multiple logging paths
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*targets) ⇒ MultiDelegator
constructor
A new instance of MultiDelegator.
Constructor Details
#initialize(*targets) ⇒ MultiDelegator
Returns a new instance of MultiDelegator.
32 33 34 |
# File 'lib/openstudio/workflow/multi_delegator.rb', line 32 def initialize(*targets) @targets = targets end |
Class Method Details
.delegate(*methods) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/openstudio/workflow/multi_delegator.rb', line 36 def self.delegate(*methods) methods.each do |m| define_method(m) do |*args| @targets.map { |t| t.send(m, *args) } end end self end |