Exception: Yadirect::ApiError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Yadirect::ApiError
- Defined in:
- lib/api_error.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_detail ⇒ Object
readonly
Returns the value of attribute error_detail.
-
#error_str ⇒ Object
readonly
Returns the value of attribute error_str.
Instance Method Summary collapse
-
#initialize(hash) ⇒ ApiError
constructor
A new instance of ApiError.
- #to_s ⇒ Object
Constructor Details
#initialize(hash) ⇒ ApiError
Returns a new instance of ApiError.
5 6 7 8 9 |
# File 'lib/api_error.rb', line 5 def initialize(hash) @error_detail = hash["error_detail"] @error_str = hash["error_str"] @error_code = hash["error_code"] end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
3 4 5 |
# File 'lib/api_error.rb', line 3 def error_code @error_code end |
#error_detail ⇒ Object (readonly)
Returns the value of attribute error_detail.
3 4 5 |
# File 'lib/api_error.rb', line 3 def error_detail @error_detail end |
#error_str ⇒ Object (readonly)
Returns the value of attribute error_str.
3 4 5 |
# File 'lib/api_error.rb', line 3 def error_str @error_str end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/api_error.rb', line 11 def to_s "@error_detail=\"#{@error_detail}\", @error_str=\"#{@error_str}\", @error_code=\"#{@error_code}\"" end |