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