Exception: Bright::ResponseError
- Defined in:
- lib/bright/errors.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, message = nil) ⇒ ResponseError
constructor
A new instance of ResponseError.
- #to_s ⇒ Object
Constructor Details
#initialize(response, message = nil) ⇒ ResponseError
Returns a new instance of ResponseError.
5 6 7 8 |
# File 'lib/bright/errors.rb', line 5 def initialize(response, = nil) @response = response @message = end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/bright/errors.rb', line 3 def response @response end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/bright/errors.rb', line 10 def to_s "Failed with #{response.code} #{response. if response.respond_to?(:message)}" end |