Method: Bixby::WebSocket::Response#initialize

Defined in:
lib/bixby-common/websocket/response.rb

#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