Exception: Jammed::HTTPError
- Inherits:
-
StandardError
- Object
- StandardError
- Jammed::HTTPError
- Defined in:
- lib/jammed/errors.rb
Overview
:nodoc:
Direct Known Subclasses
BadRequest, InformJammed, NotFound, RateLimited, ServerError, Unavailable
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, params = {}) ⇒ HTTPError
constructor
A new instance of HTTPError.
- #to_s ⇒ Object
Constructor Details
#initialize(response, params = {}) ⇒ HTTPError
Returns a new instance of HTTPError.
6 7 8 9 10 |
# File 'lib/jammed/errors.rb', line 6 def initialize(response, params = {}) @response = response @params = params super(response) end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'lib/jammed/errors.rb', line 4 def params @params end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/jammed/errors.rb', line 3 def response @response end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/jammed/errors.rb', line 12 def to_s "#{self.class.to_s} : #{response.code} #{response.body}" end |