Class: WSDL::XMLSchema::Importer

Inherits:
Object
  • Object
show all
Defined in:
lib/wsdl/xmlSchema/importer.rb

Direct Known Subclasses

Importer

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeImporter

Returns a new instance of Importer.



22
23
24
# File 'lib/wsdl/xmlSchema/importer.rb', line 22

def initialize
  @web_client = nil
end

Class Method Details

.import(location, originalroot = nil) ⇒ Object



18
19
20
# File 'lib/wsdl/xmlSchema/importer.rb', line 18

def self.import(location, originalroot = nil)
  new.import(location, originalroot)
end

Instance Method Details

#import(location, originalroot = nil) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/wsdl/xmlSchema/importer.rb', line 26

def import(location, originalroot = nil)
  unless location.is_a?(URI)
    location = URI.parse(location)
  end
  content = parse(fetch(location), location, originalroot)
  content.location = location
  content
end