Module: XSD::Based
- Included in:
- Extension, Restriction
- Defined in:
- lib/xsd/shared/based.rb
Overview
Used by extension and restriction elements
Instance Attribute Summary collapse
-
#base ⇒ Object
Required.
-
#base_complex_type ⇒ Object
Base complexType.
-
#base_simple_type ⇒ Object
Base simpleType.
Class Method Summary collapse
-
.included(obj) ⇒ Object
Base simpleType.
Instance Method Summary collapse
-
#collect_attributes(include_base = true) ⇒ Object
Get all available attributes on the current stack level, optionally including base type attributes.
-
#collect_elements(include_base = true) ⇒ Object
Get all available elements on the current stack level, optionally including base type elements.
Instance Attribute Details
#base ⇒ Object
Required. Specifies the name of a built-in data type, a simpleType element, or a complexType element
|
# File 'lib/xsd/shared/based.rb', line 6
|
#base_complex_type ⇒ Object
Base complexType
|
# File 'lib/xsd/shared/based.rb', line 10
|
#base_simple_type ⇒ Object
Base simpleType
17 18 19 20 21 |
# File 'lib/xsd/shared/based.rb', line 17 def self.included(obj) obj.property :base, :string, required: true obj.link :base_complex_type, :complexType, property: :base obj.link :base_simple_type, :simpleType, property: :base end |
Class Method Details
.included(obj) ⇒ Object
Base simpleType
17 18 19 20 21 |
# File 'lib/xsd/shared/based.rb', line 17 def self.included(obj) obj.property :base, :string, required: true obj.link :base_complex_type, :complexType, property: :base obj.link :base_simple_type, :simpleType, property: :base end |
Instance Method Details
#collect_attributes(include_base = true) ⇒ Object
Get all available attributes on the current stack level, optionally including base type attributes
33 34 35 |
# File 'lib/xsd/shared/based.rb', line 33 def collect_attributes(include_base = true) (include_base && base_complex_type ? base_complex_type.collect_attributes : []) + super end |
#collect_elements(include_base = true) ⇒ Object
Get all available elements on the current stack level, optionally including base type elements
26 27 28 |
# File 'lib/xsd/shared/based.rb', line 26 def collect_elements(include_base = true) (include_base && base_complex_type ? base_complex_type.collect_elements : []) + super end |