Class: WsdlMapper::Dom::ComplexType
- Defined in:
- lib/wsdl_mapper/dom/complex_type.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#base ⇒ Object
Returns the value of attribute base.
-
#base_type_name ⇒ Object
Returns the value of attribute base_type_name.
-
#containing_element ⇒ Object
Returns the value of attribute containing_element.
-
#containing_property ⇒ Object
Returns the value of attribute containing_property.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#simple_content ⇒ Object
Returns the value of attribute simple_content.
-
#soap_array ⇒ Object
Returns the value of attribute soap_array.
-
#soap_array_type ⇒ Object
Returns the value of attribute soap_array_type.
-
#soap_array_type_name ⇒ Object
Returns the value of attribute soap_array_type_name.
Attributes inherited from TypeBase
Instance Method Summary collapse
- #add_attribute(attribute) ⇒ Object
- #add_property(property) ⇒ Object
- #bases ⇒ Object
- #each_attribute(&block) ⇒ Object
- #each_property(&block) ⇒ Object
- #each_property_with_bases(&block) ⇒ Object
-
#initialize(name) ⇒ ComplexType
constructor
A new instance of ComplexType.
- #root ⇒ Object
- #simple_content? ⇒ Boolean
- #soap_array? ⇒ Boolean
Methods inherited from TypeBase
Constructor Details
#initialize(name) ⇒ ComplexType
Returns a new instance of ComplexType.
10 11 12 13 14 15 16 17 |
# 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 |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
6 7 8 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 6 def attributes @attributes end |
#base ⇒ Object
Returns the value of attribute base.
7 8 9 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 7 def base @base end |
#base_type_name ⇒ Object
Returns the value of attribute base_type_name.
7 8 9 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 7 def base_type_name @base_type_name end |
#containing_element ⇒ Object
Returns the value of attribute containing_element.
7 8 9 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 7 def containing_element @containing_element end |
#containing_property ⇒ Object
Returns the value of attribute containing_property.
7 8 9 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 7 def containing_property @containing_property end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
6 7 8 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 6 def properties @properties end |
#simple_content ⇒ Object
Returns the value of attribute simple_content.
7 8 9 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 7 def simple_content @simple_content end |
#soap_array ⇒ Object
Returns the value of attribute soap_array.
7 8 9 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 7 def soap_array @soap_array end |
#soap_array_type ⇒ Object
Returns the value of attribute soap_array_type.
7 8 9 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 7 def soap_array_type @soap_array_type end |
#soap_array_type_name ⇒ Object
Returns the value of attribute soap_array_type_name.
7 8 9 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 7 def soap_array_type_name @soap_array_type_name end |
Instance Method Details
#add_attribute(attribute) ⇒ Object
19 20 21 22 |
# 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) ⇒ Object
24 25 26 27 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 24 def add_property(property) property.containing_type = self @properties[property.name] = property end |
#bases ⇒ Object
55 56 57 58 59 60 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 55 def bases # TODO: test return [] unless @base [*@base.bases, @base] end |
#each_attribute(&block) ⇒ Object
39 40 41 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 39 def each_attribute(&block) attributes.values.each(&block) end |
#each_property(&block) ⇒ Object
29 30 31 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 29 def each_property(&block) properties.values.each(&block) end |
#each_property_with_bases(&block) ⇒ Object
33 34 35 36 37 |
# 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 ⇒ Object
51 52 53 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 51 def root @base ? @base.root : self end |
#simple_content? ⇒ Boolean
43 44 45 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 43 def simple_content? !!@simple_content end |
#soap_array? ⇒ Boolean
47 48 49 |
# File 'lib/wsdl_mapper/dom/complex_type.rb', line 47 def soap_array? !!@soap_array end |