Class: Wamp::Manager::Event::Publish
- Defined in:
- lib/wamp/manager/event/publish.rb
Overview
Publish Message Event
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#emit_event, #emit_event_name, #error?, #initialize, #listen_event_name, #transmit
Constructor Details
This class inherits a constructor from Wamp::Manager::Event::Base
Instance Method Details
#add_event_listener(&block) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/wamp/manager/event/publish.rb', line 10 def add_event_listener(&block) session.transmit(payload) return unless block_given? session.on(listen_event_name) do |publication| session.off(listen_event_name) block.call(publication, nil) end end |