Exception: BitlyOAuth::Error
- Inherits:
-
StandardError
- Object
- StandardError
- BitlyOAuth::Error
- Defined in:
- lib/bitly_oauth/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) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 13 |
# File 'lib/bitly_oauth/error.rb', line 7 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.
3 4 5 |
# File 'lib/bitly_oauth/error.rb', line 3 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/bitly_oauth/error.rb', line 3 def response @response end |