Class: Bixby::WebSocket::Request
- Inherits:
-
Message
- Object
- Message
- Bixby::WebSocket::Request
show all
- Defined in:
- lib/bixby-common/websocket/request.rb
Instance Attribute Summary
Attributes inherited from Message
#body, #headers, #id, #type
Instance Method Summary
collapse
Methods inherited from Message
from_wire, #to_s, #to_wire
Constructor Details
#initialize(json_request, id = nil, type = "rpc", headers = nil) ⇒ 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", =nil)
if json_request.respond_to? : then
= json_request.
end
super(id, type, )
@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
|