Exception: BitlyrError
- Inherits:
-
StandardError
- Object
- StandardError
- BitlyrError
- Defined in:
- lib/bitlyr/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ BitlyrError
constructor
A new instance of BitlyrError.
Constructor Details
#initialize(response) ⇒ BitlyrError
Returns a new instance of BitlyrError.
6 7 8 9 10 11 12 |
# File 'lib/bitlyr/error.rb', line 6 def initialize(response) @response = response @message = response.reason @code = response.status super("#{@message} - '#{@code}'") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
2 3 4 |
# File 'lib/bitlyr/error.rb', line 2 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
2 3 4 |
# File 'lib/bitlyr/error.rb', line 2 def response @response end |