Class: XRBP::WebSocket::Command
- Defined in:
- lib/xrbp/websocket/command.rb
Direct Known Subclasses
XRBP::WebSocket::Cmds::AccountInfo, XRBP::WebSocket::Cmds::AccountLines, XRBP::WebSocket::Cmds::AccountObjects, XRBP::WebSocket::Cmds::AccountOffers, XRBP::WebSocket::Cmds::AccountTx, XRBP::WebSocket::Cmds::BookOffers, XRBP::WebSocket::Cmds::Ledger, XRBP::WebSocket::Cmds::LedgerEntry, XRBP::WebSocket::Cmds::ServerInfo, XRBP::WebSocket::Cmds::Subscribe
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Attributes inherited from Message
#bl, #connection, #result, #time
Instance Method Summary collapse
-
#initialize(data) ⇒ Command
constructor
A new instance of Command.
- #requesting ⇒ Object
- #requesting?(tgt) ⇒ Boolean
Methods inherited from Message
Constructor Details
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/xrbp/websocket/command.rb', line 6 def id @id end |
#json ⇒ Object (readonly)
Returns the value of attribute json.
7 8 9 |
# File 'lib/xrbp/websocket/command.rb', line 7 def json @json end |
Instance Method Details
#requesting ⇒ Object
21 22 23 |
# File 'lib/xrbp/websocket/command.rb', line 21 def requesting @json[:command] || @json["command"] end |
#requesting?(tgt) ⇒ Boolean
25 26 27 |
# File 'lib/xrbp/websocket/command.rb', line 25 def requesting?(tgt) requesting.to_s == tgt.to_s end |