class WsdlMapper::Dom::ComplexType

Attributes

attributes[R]
base[RW]
base_type_name[RW]
containing_element[RW]
containing_property[RW]
properties[R]
simple_content[RW]
soap_array[RW]
soap_array_type[RW]
soap_array_type_name[RW]

Public Class Methods

new(name) click to toggle source
Calls superclass method WsdlMapper::Dom::TypeBase::new
# File lib/wsdl_mapper/dom/complex_type.rb, line 10
def initialize(name)
  super
  @properties = {}
  @attributes = {}
  @simple_content = false
  @soap_array = false
  @base = nil
end

Public Instance Methods

add_attribute(attribute) click to toggle source
# File lib/wsdl_mapper/dom/complex_type.rb, line 19
def add_attribute(attribute)
  attribute.containing_type = self
  @attributes[attribute.name] = attribute
end
add_property(property) click to toggle source
# File lib/wsdl_mapper/dom/complex_type.rb, line 24
def add_property(property)
  property.containing_type = self
  @properties[property.name] = property
end
bases() click to toggle source
# File lib/wsdl_mapper/dom/complex_type.rb, line 55
def bases
  # TODO: test
  return [] unless @base

  [*@base.bases, @base]
end
each_attribute(&block) click to toggle source
# File lib/wsdl_mapper/dom/complex_type.rb, line 39
def each_attribute(&block)
  attributes.values.each(&block)
end
each_property(&block) click to toggle source
# File lib/wsdl_mapper/dom/complex_type.rb, line 29
def each_property(&block)
  properties.values.each(&block)
end
each_property_with_bases(&block) click to toggle source
# File lib/wsdl_mapper/dom/complex_type.rb, line 33
def each_property_with_bases(&block)
  [*bases, self].inject([]) do |arr, type|
    arr + type.each_property.to_a
  end.each(&block)
end
root() click to toggle source
# File lib/wsdl_mapper/dom/complex_type.rb, line 51
def root
  @base ? @base.root : self
end
simple_content?() click to toggle source
# File lib/wsdl_mapper/dom/complex_type.rb, line 43
def simple_content?
  !!@simple_content
end
soap_array?() click to toggle source
# File lib/wsdl_mapper/dom/complex_type.rb, line 47
def soap_array?
  !!@soap_array
end