class Blanket::Exception
The base class for all Blanket
Exceptions
Attributes
message[W]
Attribute writer for the Exception
message
response[R]
Attribute reader for the Exception
http response
Public Class Methods
Public Instance Methods
body()
click to toggle source
Returns the HTTP response body
# File lib/blanket/exception.rb, line 64 def body @response.body.to_s if @response end
code()
click to toggle source
Returns the HTTP status code
# File lib/blanket/exception.rb, line 69 def code @response.code.to_i if @response end
inspect()
click to toggle source
Returns a stringified error message
# File lib/blanket/exception.rb, line 79 def inspect "#{message}: #{body}" end
Also aliased as: to_s
message()
click to toggle source
Returns a formatted error message
# File lib/blanket/exception.rb, line 74 def message @message || self.class.name end