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
Calls superclass method
# 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
respond_to_missing?(name, include_private = false) click to toggle 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