Class: Lutaml::HashFormat::Adapter::Mapping

Inherits:
KeyValue::Mapping show all
Defined in:
lib/lutaml/hash_format/adapter/mapping.rb

Instance Attribute Summary

Attributes inherited from KeyValue::Mapping

#format, #key_mapping, #mappings, #register_mappings, #value_mapping

Instance Method Summary collapse

Methods inherited from KeyValue::Mapping

#duplicate_mappings, #finalize, #finalized?, #find_by_name, #find_by_to, #find_by_to!, #import_model_mappings, #instance_mapping?, #map, #map_all, #map_instances, #map_key, #map_to_instance, #map_value, #mappings_hash, #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 Model::Mapping

#add_listener, #all_listeners, #ensure_mappings_imported!, #inherit_from, #listeners_for, #mappings, #omit_element, #omit_listener, #parent_mapping

Constructor Details

#initializeMapping

Returns a new instance of Mapping.



7
8
9
# File 'lib/lutaml/hash_format/adapter/mapping.rb', line 7

def initialize
  super(:hash)
end

Instance Method Details

#deep_dupObject



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

def deep_dup
  self.class.new.tap do |new_mapping|
    new_mapping.mappings = duplicate_mappings
  end
end