Module: XSD::ComplexTyped
- Included in:
- Element
- Defined in:
- lib/xsd/shared/complex_typed.rb
Overview
Provides object an ability to have complex type (nested or linked)
Instance Attribute Summary collapse
-
#complex_type ⇒ Object
Child/linked complex type.
Class Method Summary collapse
-
.included(obj) ⇒ Object
Child/linked complex type.
Instance Method Summary collapse
-
#collect_attributes(linked_type = true) ⇒ Object
Get all available attributes on the current stack level or linked type attributes.
-
#collect_elements(linked_type = true) ⇒ Object
Get all available elements on the current stack level or linked type elements.
Instance Attribute Details
#complex_type ⇒ Object
Child/linked complex type
9 10 11 12 |
# File 'lib/xsd/shared/complex_typed.rb', line 9 def self.included(obj) obj.child :complex_type, :complexType obj.link :complex_type, :complexType, property: obj::TYPE_PROPERTY end |
Class Method Details
.included(obj) ⇒ Object
Child/linked complex type
9 10 11 12 |
# File 'lib/xsd/shared/complex_typed.rb', line 9 def self.included(obj) obj.child :complex_type, :complexType obj.link :complex_type, :complexType, property: obj::TYPE_PROPERTY end |
Instance Method Details
#collect_attributes(linked_type = true) ⇒ Object
Get all available attributes on the current stack level or linked type attributes
24 25 26 |
# File 'lib/xsd/shared/complex_typed.rb', line 24 def collect_attributes(linked_type = true) (linked_type && complex_type&.linked? ? complex_type.collect_attributes : super) end |
#collect_elements(linked_type = true) ⇒ Object
Get all available elements on the current stack level or linked type elements
17 18 19 |
# File 'lib/xsd/shared/complex_typed.rb', line 17 def collect_elements(linked_type = true) (linked_type && complex_type&.linked? ? complex_type.collect_elements : super) end |