Class: XRBP::WebSocket::Cmds::Subscribe
- Inherits:
-
XRBP::WebSocket::Command
- Object
- Message
- XRBP::WebSocket::Command
- XRBP::WebSocket::Cmds::Subscribe
- Defined in:
- lib/xrbp/websocket/cmds/subscribe.rb
Overview
The subscribe method requests periodic notifications from the server when certain events happen
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
Attributes inherited from XRBP::WebSocket::Command
Attributes inherited from Message
#bl, #connection, #result, #time
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Subscribe
constructor
A new instance of Subscribe.
- #to_h ⇒ Object
Methods inherited from XRBP::WebSocket::Command
Methods inherited from Message
Constructor Details
#initialize(args = {}) ⇒ Subscribe
Returns a new instance of Subscribe.
11 12 13 14 |
# File 'lib/xrbp/websocket/cmds/subscribe.rb', line 11 def initialize(args={}) @args = args super(to_h) end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
9 10 11 |
# File 'lib/xrbp/websocket/cmds/subscribe.rb', line 9 def args @args end |
Instance Method Details
#to_h ⇒ Object
16 17 18 |
# File 'lib/xrbp/websocket/cmds/subscribe.rb', line 16 def to_h args.merge(:command => :subscribe) end |