Module: WsdlMapper::Dom::ShallowSchema

Includes:
Enumerable
Included in:
BuiltinType, SoapEncodingType
Defined in:
lib/wsdl_mapper/dom/shallow_schema.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#namespaceObject

Returns the value of attribute namespace.



6
7
8
# File 'lib/wsdl_mapper/dom/shallow_schema.rb', line 6

def namespace
  @namespace
end

Instance Method Details

#[](name) ⇒ Object



14
15
16
# File 'lib/wsdl_mapper/dom/shallow_schema.rb', line 14

def [](name)
  types[name]
end

#build(name) ⇒ Object



18
19
20
21
# File 'lib/wsdl_mapper/dom/shallow_schema.rb', line 18

def build(name)
  n = name.is_a?(WsdlMapper::Dom::Name) ? name : Name.get(namespace, name)
  new n
end

#builtin?(name) ⇒ Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/wsdl_mapper/dom/shallow_schema.rb', line 29

def builtin?(name)
  return name.ns == namespace
end

#each(&block) ⇒ Object



25
26
27
# File 'lib/wsdl_mapper/dom/shallow_schema.rb', line 25

def each(&block)
  types.values.each(&block)
end

#typesObject



8
9
10
11
12
# File 'lib/wsdl_mapper/dom/shallow_schema.rb', line 8

def types
  @types ||= Hash.new do |h, k|
    h[k] = build k
  end
end