Class: MmJsonClient::JsonRpcHttp::Error
- Inherits:
-
Object
- Object
- MmJsonClient::JsonRpcHttp::Error
- Defined in:
- lib/mm_json_client/json_rpc_http/error.rb
Overview
A standard formatted JSON-RPC error.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(data) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(data) ⇒ Error
Returns a new instance of Error.
11 12 13 14 15 |
# File 'lib/mm_json_client/json_rpc_http/error.rb', line 11 def initialize(data) @code = data['code'] @data = data['data'] @message = data['message'] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/mm_json_client/json_rpc_http/error.rb', line 7 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
8 9 10 |
# File 'lib/mm_json_client/json_rpc_http/error.rb', line 8 def data @data end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
9 10 11 |
# File 'lib/mm_json_client/json_rpc_http/error.rb', line 9 def @message end |