Class: WampRails::Command::Register
- Inherits:
-
BaseHandler
- Object
- BaseCommand
- BaseHandler
- WampRails::Command::Register
- Defined in:
- lib/wamp_rails/commands/register.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#procedure ⇒ Object
Returns the value of attribute procedure.
Attributes inherited from BaseHandler
Attributes inherited from BaseCommand
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(procedure, klass, options, client) ⇒ Register
constructor
A new instance of Register.
Methods inherited from BaseHandler
Methods inherited from BaseCommand
Constructor Details
#initialize(procedure, klass, options, client) ⇒ Register
Returns a new instance of Register.
6 7 8 9 10 11 12 13 14 |
# File 'lib/wamp_rails/commands/register.rb', line 6 def initialize(procedure, klass, , client) super(client, klass) self.procedure = procedure self. = unless self.klass < WampRails::Controller::Procedure raise WampRails::Error.new('klass must be a WampRails::Controller::Procedure class') end end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/wamp_rails/commands/register.rb', line 4 def @options end |
#procedure ⇒ Object
Returns the value of attribute procedure.
4 5 6 |
# File 'lib/wamp_rails/commands/register.rb', line 4 def procedure @procedure end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 |
# File 'lib/wamp_rails/commands/register.rb', line 16 def execute session.register(procedure, handler, ) do |result, error, details| self.callback(result, error, details) end end |