class Savon::HTTPError
Attributes
http[R]
Public Class Methods
new(http)
click to toggle source
# File lib/savon/http_error.rb, line 10 def initialize(http) @http = http end
present?(http)
click to toggle source
# File lib/savon/http_error.rb, line 6 def self.present?(http) http.error? end
Public Instance Methods
to_hash()
click to toggle source
# File lib/savon/http_error.rb, line 22 def to_hash { :code => @http.code, :headers => @http.headers, :body => @http.body } end
to_s()
click to toggle source
# File lib/savon/http_error.rb, line 16 def to_s message = "HTTP error (#{@http.code})" message << ": #{@http.body}" unless @http.body.empty? message end