Module: Lutaml::XMI::Parsers::XMIBase
- Included in:
- AssociationDrop, AttributeDrop, CardinalityDrop, ConstraintDrop, DataTypeDrop, DiagramDrop, EnumDrop, EnumOwnedLiteralDrop, GeneralizationAttributeDrop, GeneralizationDrop, KlassDrop, OperationDrop, Lutaml::XMI::PackageDrop, XML
- Defined in:
- lib/lutaml/xmi/parsers/xmi_base.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
13 14 15 |
# File 'lib/lutaml/xmi/parsers/xmi_base.rb', line 13 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#get_guidance(yaml) ⇒ Hash
36 37 38 39 40 |
# File 'lib/lutaml/xmi/parsers/xmi_base.rb', line 36 def get_guidance(yaml) return unless yaml YAML.safe_load(File.read(yaml, encoding: "UTF-8")) end |
#set_xmi_model(xmi_model, xmi_cache = nil) ⇒ Object
28 29 30 31 32 |
# File 'lib/lutaml/xmi/parsers/xmi_base.rb', line 28 def set_xmi_model(xmi_model, xmi_cache = nil) @xmi_cache = xmi_cache ? xmi_cache : {} @xmi_root_model = xmi_model map_id_name(@xmi_cache, @xmi_root_model) if @xmi_cache.empty? end |