module Firehose
  module Server
    # A no-op message filter. This class is meant to be
    # extended by users for implementing channel middleware.
    class MessageFilter
      def initialize(channel)
        @channel = channel
        @params = {}
      end

      def process(message)
      end

      def on_subscribe(params)
        @params = params
      end

      def on_unsubscribe
        @params = {}
      end
    end
  end
end

module Firehose
  module Server
    # A no-op message filter. This class is meant to be
    # extended by users for implementing channel middleware.
    class MessageFilter
      attr_reader :channel, :params

      def initialize(channel)
        @channel = channel
        @params = {}
      end

      def process(message)
      end

      def on_subscribe(params)
        @params = params
      end

      def on_unsubscribe
        @params = {}
      end
    end
  end
end

Add attr_reader for MessageFilter channel & params
Add attr_reader for MessageFilter channel & params
