Class: Sekken::Importer
- Inherits:
-
Object
- Object
- Sekken::Importer
- Defined in:
- lib/sekken/importer.rb
Instance Method Summary collapse
- #import(location) ⇒ Object
-
#initialize(resolver, documents, schemas) ⇒ Importer
constructor
A new instance of Importer.
Constructor Details
#initialize(resolver, documents, schemas) ⇒ Importer
Returns a new instance of Importer.
7 8 9 10 11 12 13 |
# File 'lib/sekken/importer.rb', line 7 def initialize(resolver, documents, schemas) @logger = Logging.logger[self] @resolver = resolver @documents = documents @schemas = schemas end |
Instance Method Details
#import(location) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/sekken/importer.rb', line 15 def import(location) @import_locations = [] @logger.info("Resolving WSDL document #{location.inspect}.") import_document(location) do |document| @documents << document @schemas.push(document.schemas) end # resolve xml schema imports import_schemas do |schema_location| @logger.info("Resolving XML schema import #{schema_location.inspect}.") import_document(schema_location) do |document| @schemas.push(document.schemas) end end end |