Class: Lutaml::Model::Schema::XmlCompiler::AttributeGroup
- Inherits:
-
Object
- Object
- Lutaml::Model::Schema::XmlCompiler::AttributeGroup
- Defined in:
- lib/lutaml/model/schema/xml_compiler/attribute_group.rb
Instance Attribute Summary collapse
-
#instances ⇒ Object
Returns the value of attribute instances.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ref ⇒ Object
Returns the value of attribute ref.
Instance Method Summary collapse
- #<<(instance) ⇒ Object
-
#initialize(name: nil, ref: nil) ⇒ AttributeGroup
constructor
A new instance of AttributeGroup.
- #required_files ⇒ Object
- #to_attributes(indent) ⇒ Object
- #to_xml_mapping(indent) ⇒ Object
Constructor Details
#initialize(name: nil, ref: nil) ⇒ AttributeGroup
10 11 12 13 14 |
# File 'lib/lutaml/model/schema/xml_compiler/attribute_group.rb', line 10 def initialize(name: nil, ref: nil) @name = name @ref = ref @instances = [] end |
Instance Attribute Details
#instances ⇒ Object
Returns the value of attribute instances.
8 9 10 |
# File 'lib/lutaml/model/schema/xml_compiler/attribute_group.rb', line 8 def instances @instances end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/lutaml/model/schema/xml_compiler/attribute_group.rb', line 8 def name @name end |
#ref ⇒ Object
Returns the value of attribute ref.
8 9 10 |
# File 'lib/lutaml/model/schema/xml_compiler/attribute_group.rb', line 8 def ref @ref end |
Instance Method Details
#<<(instance) ⇒ Object
16 17 18 19 20 |
# File 'lib/lutaml/model/schema/xml_compiler/attribute_group.rb', line 16 def <<(instance) return if instance.nil? @instances << instance end |
#required_files ⇒ Object
30 31 32 |
# File 'lib/lutaml/model/schema/xml_compiler/attribute_group.rb', line 30 def required_files resolved_instances.map(&:required_files) end |
#to_attributes(indent) ⇒ Object
22 23 24 |
# File 'lib/lutaml/model/schema/xml_compiler/attribute_group.rb', line 22 def to_attributes(indent) resolved_instances.map { |instance| instance.to_attributes(indent) } end |
#to_xml_mapping(indent) ⇒ Object
26 27 28 |
# File 'lib/lutaml/model/schema/xml_compiler/attribute_group.rb', line 26 def to_xml_mapping(indent) resolved_instances.map { |instance| instance.to_xml_mapping(indent) } end |