Exception: Shouqianba::Webapi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Shouqianba::Webapi::Error
- Defined in:
- lib/shouqianba/webapi.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#result_code ⇒ Object
Returns the value of attribute result_code.
Instance Method Summary collapse
-
#initialize(result_code, error_message, data) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(result_code, error_message, data) ⇒ Error
Returns a new instance of Error.
9 10 11 12 13 14 15 |
# File 'lib/shouqianba/webapi.rb', line 9 def initialize(result_code, , data) @result_code = result_code.to_i @error_message = @data = data = "[ result_code: #{@result_code}, error_message: #{@error_message} ]" super() end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
7 8 9 |
# File 'lib/shouqianba/webapi.rb', line 7 def data @data end |
#error_message ⇒ Object
Returns the value of attribute error_message.
7 8 9 |
# File 'lib/shouqianba/webapi.rb', line 7 def @error_message end |
#result_code ⇒ Object
Returns the value of attribute result_code.
7 8 9 |
# File 'lib/shouqianba/webapi.rb', line 7 def result_code @result_code end |