Class: MmJsonClient::JsonRpcHttp::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/mm_json_client/json_rpc_http/error.rb

Overview

A standard formatted JSON-RPC error.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (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

#dataObject (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

#messageObject (readonly)

Returns the value of attribute message.



9
10
11
# File 'lib/mm_json_client/json_rpc_http/error.rb', line 9

def message
  @message
end