Forwards any messages sent to this object to all recipients that respond to that message.
# File lib/cucumber/formatter/fanout.rb, line 10 def initialize(recipients) @recipients = recipients end
# File lib/cucumber/formatter/fanout.rb, line 14 def method_missing(message, *args) recipients.each do |recipient| recipient.send(message, *args) if recipient.respond_to?(message) end end
# File lib/cucumber/formatter/fanout.rb, line 20 def respond_to_missing?(name, include_private = false) recipients.any? { |recipient| recipient.respond_to?(name, include_private) } end