Skip to content

Commit

Permalink
internal renaming of response#to_xml to #xml
Browse files Browse the repository at this point in the history
does not affect the api, because both methods still exist.
  • Loading branch information
rubiii committed Jun 30, 2013
1 parent cacd2f9 commit cfcd2b7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/savon/response.rb
Expand Up @@ -51,18 +51,18 @@ def to_array(*path)
end

def hash
@hash ||= nori.parse(to_xml)
@hash ||= nori.parse(xml)
end

def to_xml
def xml
@http.body
end

alias_method :xml, :to_xml
alias_method :to_s, :to_xml
alias_method :to_xml, :xml
alias_method :to_s, :xml

def doc
@doc ||= Nokogiri.XML(to_xml)
@doc ||= Nokogiri.XML(xml)
end

def xpath(path, namespaces = nil)
Expand All @@ -82,7 +82,7 @@ def raise_soap_and_http_errors!
end

def raise_invalid_response_error!
raise InvalidResponseError, "Unable to parse response body:\n" + to_xml.inspect
raise InvalidResponseError, "Unable to parse response body:\n" + xml.inspect
end

def xml_namespaces
Expand Down

0 comments on commit cfcd2b7

Please sign in to comment.