Class: Lutaml::Model::Schema::XmlCompiler::ComplexContentRestriction
- Inherits:
-
Object
- Object
- Lutaml::Model::Schema::XmlCompiler::ComplexContentRestriction
- Defined in:
- lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
Returns the value of attribute base.
-
#instances ⇒ Object
Returns the value of attribute instances.
Instance Method Summary collapse
- #<<(instance) ⇒ Object
-
#initialize(base: nil, instances: []) ⇒ ComplexContentRestriction
constructor
A new instance of ComplexContentRestriction.
- #required_files ⇒ Object
- #to_attributes(indent) ⇒ Object
- #to_xml_mapping(indent) ⇒ Object
Constructor Details
#initialize(base: nil, instances: []) ⇒ ComplexContentRestriction
Returns a new instance of ComplexContentRestriction.
8 9 10 11 |
# File 'lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb', line 8 def initialize(base: nil, instances: []) @base = base @instances = instances end |
Instance Attribute Details
#base ⇒ Object
Returns the value of attribute base.
6 7 8 |
# File 'lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb', line 6 def base @base end |
#instances ⇒ Object
Returns the value of attribute instances.
6 7 8 |
# File 'lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb', line 6 def instances @instances end |
Instance Method Details
#<<(instance) ⇒ Object
13 14 15 16 17 |
# File 'lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb', line 13 def <<(instance) return if instance.nil? @instances << instance end |
#required_files ⇒ Object
27 28 29 |
# File 'lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb', line 27 def required_files instances.map(&:required_files) end |
#to_attributes(indent) ⇒ Object
19 20 21 |
# File 'lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb', line 19 def to_attributes(indent) instances.map { |instance| instance.to_attributes(indent) } end |
#to_xml_mapping(indent) ⇒ Object
23 24 25 |
# File 'lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb', line 23 def to_xml_mapping(indent) instances.map { |instance| instance.to_xml_mapping(indent) } end |