Class: JSONRPCOverMQTT::JSONRPC::Response
- Inherits:
-
Object
- Object
- JSONRPCOverMQTT::JSONRPC::Response
- Defined in:
- lib/json_rpc_over_mqtt_example/json_rpc/response.rb
Class Method Summary collapse
Class Method Details
.generate(json_rpc_id, response) ⇒ Object
13 14 15 |
# File 'lib/json_rpc_over_mqtt_example/json_rpc/response.rb', line 13 def self.generate(json_rpc_id, response) generate_response(json_rpc_id, response) end |
.generate_response(json_rpc_id, response) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/json_rpc_over_mqtt_example/json_rpc/response.rb', line 5 def self.generate_response(json_rpc_id, response) ::JSON.generate({ jsonrpc: VERSION, id: json_rpc_id, result: response }) end |