Class: Wamp::MessageHandler::Event

Inherits:
Base
  • Object
show all
Defined in:
lib/wamp/message_handler/event.rb

Overview

publish event to subscriber

Instance Attribute Summary

Attributes inherited from Base

#connection, #message

Instance Method Summary collapse

Methods inherited from Base

#initialize, #send_message

Constructor Details

This class inherits a constructor from Wamp::MessageHandler::Base

Instance Method Details

#alt_store_keyObject



13
14
15
# File 'lib/wamp/message_handler/event.rb', line 13

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

#handleObject



7
8
9
10
11
# File 'lib/wamp/message_handler/event.rb', line 7

def handle
  validate_received_message

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