Class: XmlSchemaMapper::NamespaceResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/xml_schema_mapper/namespace_resolver.rb

Defined Under Namespace

Classes: Namespace

Instance Method Summary collapse

Constructor Details

#initialize(fallback) ⇒ NamespaceResolver

Returns a new instance of NamespaceResolver.



11
12
13
# File 'lib/xml_schema_mapper/namespace_resolver.rb', line 11

def initialize(fallback)
  @fallback = fallback
end

Instance Method Details

#by_href(href) ⇒ DuckyTyped with #prefix and #href

Returns:

  • (DuckyTyped with #prefix and #href)


26
27
# File 'lib/xml_schema_mapper/namespace_resolver.rb', line 26

def by_href(href)
end

#by_prefix(prefix) ⇒ DuckyTyped with #prefix and #href

Returns:

  • (DuckyTyped with #prefix and #href)


30
31
# File 'lib/xml_schema_mapper/namespace_resolver.rb', line 30

def by_prefix(prefix)
end

#find_by_href(href) ⇒ DuckyTyped with #prefix and #href

Returns:

  • (DuckyTyped with #prefix and #href)


16
17
18
# File 'lib/xml_schema_mapper/namespace_resolver.rb', line 16

def find_by_href(href)
  by_href(href) || @fallback.find_by_href(href)
end

#find_by_prefix(prefix) ⇒ DuckyTyped with #prefix and #href

Returns:

  • (DuckyTyped with #prefix and #href)


21
22
23
# File 'lib/xml_schema_mapper/namespace_resolver.rb', line 21

def find_by_prefix(prefix)
  by_prefix(prefix) || @fallback.find_by_prefix(prefix)
end