Class: XsdReader::ComplexType
- Inherits:
-
Object
- Object
- XsdReader::ComplexType
show all
- Includes:
- Shared
- Defined in:
- lib/xsd_reader/complex_type.rb
Instance Attribute Summary
Attributes included from Shared
#options
Instance Method Summary
collapse
Methods included from Shared
#[], #all_elements, #base, #base_name, #base_namespace, #child_elements?, #choices, #class_for, #complex_content, #complex_contents, #complex_type, #complex_types, #direct_elements, #elements, #extension, #extensions, #initialize, #linked_complex_type, #linked_simple_type, #logger, #map_children, #mappable_children, #name, #name_local, #name_referenced, #node, #node_to_object, #nodes, #object_by_name, #ordered_elements, #parent, #prepend_namespace, #ref, #referenced_element, #schema, #schema_for_namespace, #schema_namespace_prefix, #sequences, #simple_content, #simple_contents, #simple_types, #type, #type_name, #type_namespace
Instance Method Details
#attributes ⇒ Object
6
7
8
|
# File 'lib/xsd_reader/complex_type.rb', line 6
def attributes
super + (simple_content ? simple_content.attributes : [])
end
|
#parent_element ⇒ Object
10
11
12
13
14
|
# File 'lib/xsd_reader/complex_type.rb', line 10
def parent_element
if parent.nil? || parent.is_a?(Schema) || !parent.is_a?(Element)
parent_elements.first
end
end
|
#parent_elements ⇒ Object
16
17
18
|
# File 'lib/xsd_reader/complex_type.rb', line 16
def parent_elements
elements_by_type(self.name)
end
|