Class: Wamp::Manager::UnregisterEvent

Inherits:
Base
  • Object
show all
Defined in:
lib/wamp/manager/hello_event.rb

Overview

Unregister Messagae Decorator

Instance Attribute Summary

Attributes inherited from Base

#session

Instance Method Summary collapse

Methods inherited from Base

#auth, #authenticate, constantize, demodulize, #emit_event, #initialize, instance_from, #on_message, #run, #transmit

Constructor Details

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

Instance Method Details

#add_event_listener(&block) ⇒ Object



211
212
213
214
215
216
# File 'lib/wamp/manager/hello_event.rb', line 211

def add_event_listener(&block)
  session.transmit(payload)
  session.on(listen_event_name) do |unregistered, error|
    block&.call(unregistered, error)
  end
end

#listen_event_nameObject



207
208
209
# File 'lib/wamp/manager/hello_event.rb', line 207

def listen_event_name
  "request_#{request_id}"
end