Class: WampRails::Command::Publish
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- WampRails::Command::Publish
- Defined in:
- lib/wamp_rails/commands/publish.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#kwargs ⇒ Object
Returns the value of attribute kwargs.
-
#options ⇒ Object
Returns the value of attribute options.
-
#topic ⇒ Object
Returns the value of attribute topic.
Attributes inherited from BaseCommand
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(topic, args, kwargs, options, client) ⇒ Publish
constructor
A new instance of Publish.
Methods inherited from BaseCommand
Constructor Details
#initialize(topic, args, kwargs, options, client) ⇒ Publish
Returns a new instance of Publish.
7 8 9 10 11 12 13 |
# File 'lib/wamp_rails/commands/publish.rb', line 7 def initialize(topic, args, kwargs, , client) super(client) self.topic = topic self.args = args self.kwargs = kwargs self. = end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
5 6 7 |
# File 'lib/wamp_rails/commands/publish.rb', line 5 def args @args end |
#kwargs ⇒ Object
Returns the value of attribute kwargs.
5 6 7 |
# File 'lib/wamp_rails/commands/publish.rb', line 5 def kwargs @kwargs end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/wamp_rails/commands/publish.rb', line 5 def @options end |
#topic ⇒ Object
Returns the value of attribute topic.
5 6 7 |
# File 'lib/wamp_rails/commands/publish.rb', line 5 def topic @topic end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 |
# File 'lib/wamp_rails/commands/publish.rb', line 15 def execute session.publish(topic, args, kwargs, ) do |result, error, details| self.callback(result, error, details) end end |