class Cucumber::Formatter::Fanout
Forwards any messages sent to this object to all recipients that respond to that message.
Attributes
recipients[R]
Public Class Methods
new(recipients)
click to toggle source
# File lib/cucumber/formatter/fanout.rb, line 11 def initialize(recipients) @recipients = recipients end
Public Instance Methods
method_missing(message, *args)
click to toggle source
# File lib/cucumber/formatter/fanout.rb, line 15 def method_missing(message, *args) recipients.each do |recipient| recipient.send(message, *args) if recipient.respond_to?(message) end end
respond_to_missing?(name, include_private = false)
click to toggle source
# File lib/cucumber/formatter/fanout.rb, line 21 def respond_to_missing?(name, include_private = false) recipients.any? { |recipient| recipient.respond_to?(name, include_private) } end