Class: WSDL::XMLSchema::Importer
- Defined in:
- lib/wsdl/xmlSchema/importer.rb
Direct Known Subclasses
Constant Summary collapse
- DO_NOT_IMPORT =
[::SOAP::EncodingNamespace]
Class Method Summary collapse
Instance Method Summary collapse
- #import(location, originalroot = nil) ⇒ Object
-
#initialize ⇒ Importer
constructor
A new instance of Importer.
Constructor Details
#initialize ⇒ Importer
Returns a new instance of Importer.
26 27 28 |
# File 'lib/wsdl/xmlSchema/importer.rb', line 26 def initialize @web_client = nil end |
Class Method Details
.import(location, originalroot = nil) ⇒ Object
22 23 24 |
# File 'lib/wsdl/xmlSchema/importer.rb', line 22 def self.import(location, originalroot = nil) new.import(location, originalroot) end |
Instance Method Details
#import(location, originalroot = nil) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/wsdl/xmlSchema/importer.rb', line 30 def import(location, originalroot = nil) if DO_NOT_IMPORT.include?(location.to_s) return nil end unless location.is_a?(URI) location = URI.parse(location) end source, normalizedlocation = fetch(location) content = parse(source, normalizedlocation, originalroot) content.location = normalizedlocation content end |