Sha256: 8ecbd3033d15258683be4eb5addf977ca540a5b57a1f4692f3f949e4472913bc

Contents?: true

Size: 348 Bytes

Versions: 3

Compression:

Stored size: 348 Bytes

Contents

# frozen_string_literal: true

module Wamp
  module MessageHandler
    # publish event to subscriber
    class Event < Base
      def handle
        validate_received_message

        store[alt_store_key].fetch(:handler).call(message)
      end

      def alt_store_key
        "subscription_#{message.subscription_id}"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xconn-0.1.2 lib/wamp/message_handler/event.rb
xconn-0.1.1 lib/wamp/message_handler/event.rb
xconn-0.1.0 lib/wamp/message_handler/event.rb