class CyberCoach::HttpError
Raised when a response is unsuccessful.
Attributes
cause[RW]
The response that caused it.
Public Class Methods
new(cause)
click to toggle source
Creates a HttpError
.
- cause
-
The response that caused it.
Calls superclass method
# File lib/cybercoach/http_error.rb, line 15 def initialize(cause) super @cause = cause end
Public Instance Methods
to_s()
click to toggle source
Returns a string representation including the cause’s header and body.
# File lib/cybercoach/http_error.rb, line 23 def to_s "#{super}\n\t#{@cause.to_hash}\n\t#{@cause.body}" end