module TextMessage::Receivable
  RECEIVERS = [ AttendanceReceiver, RegistrationReceiver ]

  private
    def receive
      receiver_class.new(self).receive
    end

    def receiver_class
      RECEIVERS.find { |klass| klass.accept?(self) }
    end
end

module TextMessage::Receivable
  RECEIVERS = [ AttendanceReceiver, RegistrationReceiver ]

  private
    def receive
      receiver_classes.each do |klass|
        klass.new(self).receive
      end
    end

    def receiver_classes
      RECEIVERS.select { |klass| klass.accept?(self) }
    end
end

Allow multiple receivers to accept a single text message
Allow multiple receivers to accept a single text message
