class WSDL::Import
Attributes
content[R]
location[R]
namespace[R]
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/wsdl/import.rb, line 21 def initialize super @namespace = nil @location = nil @content = nil @web_client = nil end
Public Instance Methods
parse_attr(attr, value)
click to toggle source
# File lib/wsdl/import.rb, line 39 def parse_attr(attr, value) case attr when NamespaceAttrName @namespace = value.source if @content @content.targetnamespace = @namespace end @namespace when LocationAttrName @location = URI.parse(value.source) if @location.relative? and !parent.location.nil? and !parent.location.relative? @location = parent.location + @location end if root.importedschema.key?(@location) @content = root.importedschema[@location] else root.importedschema[@location] = nil # placeholder @content = import(@location) if @content.is_a?(Definitions) @content.root = root if @namespace @content.targetnamespace = @namespace end end root.importedschema[@location] = @content end @location else nil end end
parse_element(element)
click to toggle source
# File lib/wsdl/import.rb, line 29 def parse_element(element) case element when DocumentationName o = Documentation.new o else nil end end
Private Instance Methods
import(location)
click to toggle source
# File lib/wsdl/import.rb, line 74 def import(location) Importer.import(location, root) end