Module: Lutaml::Xmi::Parsers::XmiBase

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

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

Parameters:

  • xmi_model (Lutaml::Model::Serializable)
  • id_name_mapping (Hash) (defaults to: nil)

Returns:

  • (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)
  @id_name_mapping ||= id_name_mapping || {}
  @xmi_root_model ||= xmi_model

  if @id_name_mapping.empty?
    map_id_name(@id_name_mapping, @xmi_root_model)
  end
end