Class: Aria2Driver::JsonRpc::Error
- Inherits:
-
Object
- Object
- Aria2Driver::JsonRpc::Error
- Defined in:
- lib/aria2_driver/json_rpc/error.rb
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(error_hash) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(error_hash) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 |
# File 'lib/aria2_driver/json_rpc/error.rb', line 7 def initialize(error_hash) @code = error_hash['code'] @message = error_hash['message'] @data = error_hash['data'] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/aria2_driver/json_rpc/error.rb', line 5 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/aria2_driver/json_rpc/error.rb', line 5 def data @data end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/aria2_driver/json_rpc/error.rb', line 5 def @message end |