class Savon::Wasabi::Document
Savon::Wasabi::Document¶ ↑
Extends the document handling of the Wasabi::Document
by
adding support for remote and local WSDL documents.
Attributes
request[W]
Sets the HTTPI::Request
for remote WSDL documents.
Public Instance Methods
xml()
click to toggle source
Hooks into Wasabi and extends its document handling.
# File lib/savon/wasabi/document.rb, line 14 def xml @xml ||= document.kind_of?(String) ? resolve_document : document end
Private Instance Methods
request()
click to toggle source
Sets up and returns the HTTPI::Request
.
# File lib/savon/wasabi/document.rb, line 24 def request @request ||= HTTPI::Request.new @request.url = document @request end
resolve_document()
click to toggle source
Resolves and returns the raw WSDL document.
# File lib/savon/wasabi/document.rb, line 31 def resolve_document case document when /^http[s]?:/ then HTTPI.get(request).body when /^</ then document else File.read(document) end end