Sha256: ac34ee47c9f5ade7b4f2e55af5e1d5280f8761cd870c113eba60c46ebd71b987

Contents?: true

Size: 862 Bytes

Versions: 16

Compression:

Stored size: 862 Bytes

Contents

require_relative "mapping_rule"

module Lutaml
  module Model
    class KeyValueMappingRule < MappingRule
      attr_reader :child_mappings

      def initialize(
        name,
        to:,
        render_nil: false,
        render_default: false,
        with: {},
        delegate: nil,
        child_mappings: nil
      )
        super(
          name,
          to: to,
          render_nil: render_nil,
          render_default: render_default,
          with: with,
          delegate: delegate,
        )

        @child_mappings = child_mappings
      end

      def deep_dup
        self.class.new(
          name.dup,
          to: to.dup,
          render_nil: render_nil.dup,
          with: Utils.deep_dup(custom_methods),
          delegate: delegate,
          child_mappings: Utils.deep_dup(child_mappings),
        )
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lutaml-model-0.4.0 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.30 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.29 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.28 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.27 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.26 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.25 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.24 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.23 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.22 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.21 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.20 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.19 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.18 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.17 lib/lutaml/model/key_value_mapping_rule.rb
lutaml-model-0.3.16 lib/lutaml/model/key_value_mapping_rule.rb