Class: Lutaml::Model::HashAdapter::Mapping

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

Instance Attribute Summary

Attributes inherited from KeyValueMapping

#format, #mappings

Instance Method Summary collapse

Methods inherited from KeyValueMapping

#duplicate_mappings, #find_by_to, #map, #map_all, #name_for_mapping, #polymorphic_mapping, #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/hash/mapping.rb', line 7

def initialize
  super(:hash)
end

Instance Method Details

#deep_dupObject



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

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