Class: Bixby::WebSocket::Request
- Defined in:
- lib/bixby-common/websocket/request.rb
Instance Attribute Summary
Attributes inherited from Message
Instance Method Summary collapse
-
#initialize(json_request, id = nil, type = "rpc", headers = nil) ⇒ Request
constructor
A new instance of Request.
- #json_request ⇒ Object
Methods inherited from Message
Constructor Details
#initialize(json_request, id = nil, type = "rpc", headers = nil) ⇒ Request
Returns a new instance of Request.
7 8 9 10 11 12 13 14 |
# File 'lib/bixby-common/websocket/request.rb', line 7 def initialize(json_request, id=nil, type="rpc", headers=nil) if json_request.respond_to? :headers then headers = json_request.headers end super(id, type, headers) @body = json_request.to_wire end |
Instance Method Details
#json_request ⇒ Object
16 17 18 |
# File 'lib/bixby-common/websocket/request.rb', line 16 def json_request JsonRequest.from_json(body) end |