Exception: AllPlayers::Error
- Inherits:
-
StandardError
- Object
- StandardError
- AllPlayers::Error
- Defined in:
- lib/allplayers/error.rb,
lib/allplayers/error/decode_error.rb,
lib/allplayers/error/restclient_error.rb
Overview
Custom error class for rescuing from all AllPlayers errors
Direct Known Subclasses
Defined Under Namespace
Classes: ClientError, DecodeError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(response) ⇒ AllPlayers::Error
constructor
Initializes a new Error object.
Constructor Details
#initialize(response) ⇒ AllPlayers::Error
Initializes a new Error object
10 11 12 13 |
# File 'lib/allplayers/error.rb', line 10 def initialize(response) @code = response.code @error = response.body end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/allplayers/error.rb', line 4 def code @code end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
4 5 6 |
# File 'lib/allplayers/error.rb', line 4 def error @error end |