class Cucumber::Formatter::Fanout
Forwards any messages sent to this object to all recipients that respond to that message.
Attributes
Public Class Methods
Source
# File lib/cucumber/formatter/fanout.rb, line 11 def initialize(recipients) @recipients = recipients end
Public Instance Methods
Source
# File lib/cucumber/formatter/fanout.rb, line 15 def method_missing(message, *args) super unless recipients recipients.each do |recipient| recipient.send(message, *args) if recipient.respond_to?(message) end end
Calls superclass method
Source
# File lib/cucumber/formatter/fanout.rb, line 23 def respond_to_missing?(name, include_private = false) recipients.any? { |recipient| recipient.respond_to?(name, include_private) } end