Class: JsonRpcObjects::V11::WD::ProcedureReturn
- Inherits:
-
JsonRpcObjects::V10::Response
- Object
- Generic::Object
- Generic::Response
- JsonRpcObjects::V10::Response
- JsonRpcObjects::V11::WD::ProcedureReturn
- Includes:
- Extensions
- Defined in:
- lib/json-rpc-objects/v11/wd/procedure-return.rb
Overview
Procedure return (response) class.
Direct Known Subclasses
Constant Summary collapse
- VERSION =
Holds link to its version module.
JsonRpcObjects::V11::WD
- VERSION_NUMBER =
Holds JSON-RPC version specification.
"1.1"
- VERSION_MEMBER =
Holds JSON-RPC version member identification.
"version"
- ERROR_CLASS =
Identifies the error object class.
JsonRpcObjects::V11::WD::Error
Instance Attribute Summary
Attributes included from Extensions
Attributes inherited from JsonRpcObjects::V10::Response
Attributes inherited from Generic::Object
Instance Method Summary collapse
-
#check! ⇒ Object
Checks correctness of the request data.
-
#output ⇒ Hash
Renders data to output hash.
Methods included from Extensions
Methods inherited from JsonRpcObjects::V10::Response
Methods inherited from Generic::Object
create, #initialize, parse, #serialize, #to_json, version
Constructor Details
This class inherits a constructor from JsonRpcObjects::Generic::Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class JsonRpcObjects::V11::WD::Extensions
Instance Method Details
#check! ⇒ Object
Checks correctness of the request data.
64 65 66 67 68 69 |
# File 'lib/json-rpc-objects/v11/wd/procedure-return.rb', line 64 def check! self.normalize! __check_coherency __check_error end |
#output ⇒ Hash
Renders data to output hash.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/json-rpc-objects/v11/wd/procedure-return.rb', line 76 def output self.check! data = { } __assign_version(data) if not @result.nil? data["result"] = @result end if not @error.nil? data["error"] = @error.output end if not @id.nil? data["id"] = @id end data.merge! Utils::Hash.map_keys(@extensions) { |k| k.to_s } return data end |