class WampRails::Command::Subscribe
Attributes
klass[RW]
options[RW]
topic[RW]
Public Class Methods
new(topic, klass, options, client)
click to toggle source
Calls superclass method
WampRails::Command::BaseHandler::new
# File lib/wamp_rails/commands/subscribe.rb, line 6 def initialize(topic, klass, options, client) super(client, klass) self.topic = topic self.options = options unless self.klass < WampRails::Controller::Subscription raise WampRails::Error.new('klass must be a WampRails::Controller::Subscription class') end end
Public Instance Methods
execute()
click to toggle source
# File lib/wamp_rails/commands/subscribe.rb, line 16 def execute session.subscribe(topic, handler, options) do |result, error, details| self.callback(result, error, details) end end