Class: Lutaml::Model::Yaml::Mapping

Inherits:
KeyValueMapping show all
Defined in:
lib/lutaml/model/yaml/mapping.rb

Instance Attribute Summary

Attributes inherited from KeyValueMapping

#format, #key_mappings, #mappings, #value_mappings

Instance Method Summary collapse

Methods inherited from KeyValueMapping

#duplicate_mappings, #find_by_name, #find_by_to, #key_value_mappings, #key_value_mappings?, #map, #map_all, #map_instances, #map_key, #map_value, #name_for_mapping, #no_root, #no_root?, #polymorphic_mapping, #root, #root_mapping, #root_name, #validate!, #validate_blank_mappings!, #validate_mappings!, #validate_root_mappings!, #validate_to_and_with_arguments!, #validate_with_options!

Methods inherited from Mapping

#mappings

Constructor Details

#initializeMapping

Returns a new instance of Mapping.



7
8
9
# File 'lib/lutaml/model/yaml/mapping.rb', line 7

def initialize
  super(:yaml)
end

Instance Method Details

#deep_dupObject



11
12
13
14
15
# File 'lib/lutaml/model/yaml/mapping.rb', line 11

def deep_dup
  self.class.new.tap do |new_mapping|
    new_mapping.instance_variable_set(:@mappings, duplicate_mappings)
  end
end