Module: Lutaml::Xmi::Parsers::XmiBase
- Included in:
- LiquidDrops::AssociationDrop, LiquidDrops::AttributeDrop, LiquidDrops::CardinalityDrop, LiquidDrops::ConnectorDrop, LiquidDrops::ConstraintDrop, LiquidDrops::DataTypeDrop, LiquidDrops::DependencyDrop, LiquidDrops::DiagramDrop, LiquidDrops::EnumDrop, LiquidDrops::EnumOwnedLiteralDrop, LiquidDrops::GeneralizationAttributeDrop, LiquidDrops::GeneralizationDrop, LiquidDrops::KlassDrop, LiquidDrops::OperationDrop, LiquidDrops::PackageDrop, LiquidDrops::SourceTargetDrop, Xml
- Defined in:
- lib/lutaml/xmi/parsers/xmi_base.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #set_xmi_model(xmi_model, id_name_mapping = nil) ⇒ Hash
-
#xmi_index ⇒ Object
Access the index, auto-initializing from @xmi_root_model if needed.
Class Method Details
.included(base) ⇒ Object
12 13 14 |
# File 'lib/lutaml/xmi/parsers/xmi_base.rb', line 12 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#set_xmi_model(xmi_model, id_name_mapping = nil) ⇒ Hash
29 30 31 32 33 34 35 36 |
# File 'lib/lutaml/xmi/parsers/xmi_base.rb', line 29 def set_xmi_model(xmi_model, id_name_mapping = nil) @xmi_root_model ||= xmi_model if @xmi_index.nil? @xmi_index = @xmi_root_model.index @id_name_mapping = id_name_mapping || @xmi_index.id_name_map end end |
#xmi_index ⇒ Object
Access the index, auto-initializing from @xmi_root_model if needed
39 40 41 42 43 44 45 |
# File 'lib/lutaml/xmi/parsers/xmi_base.rb', line 39 def xmi_index if @xmi_index.nil? && @xmi_root_model @xmi_index = @xmi_root_model.index @id_name_mapping ||= @xmi_index.id_name_map end @xmi_index end |