Class: WampRails::Command::BaseHandler
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- WampRails::Command::BaseHandler
- Defined in:
- lib/wamp_rails/commands/base_handler.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
Returns the value of attribute klass.
Attributes inherited from BaseCommand
Instance Method Summary collapse
- #handler ⇒ Object
-
#initialize(client, klass) ⇒ BaseHandler
constructor
A new instance of BaseHandler.
Methods inherited from BaseCommand
Constructor Details
#initialize(client, klass) ⇒ BaseHandler
Returns a new instance of BaseHandler.
13 14 15 16 |
# File 'lib/wamp_rails/commands/base_handler.rb', line 13 def initialize(client, klass) super(client) self.klass = klass end |
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass.
4 5 6 |
# File 'lib/wamp_rails/commands/base_handler.rb', line 4 def klass @klass end |
Instance Method Details
#handler ⇒ Object
6 7 8 9 10 11 |
# File 'lib/wamp_rails/commands/base_handler.rb', line 6 def handler lambda { |args, kwargs, details| object = klass.new(args, kwargs, details, client) object.handler } end |