Sha256: a24135b4a02d204215cccfe3abadeedb4b83fd0b81faaa88f6f1dfb19f51ff03

Contents?: true

Size: 603 Bytes

Versions: 9

Compression:

Stored size: 603 Bytes

Contents

require_relative "key_value_mapping_rule"

module Lutaml
  module Model
    class KeyValueMapping
      attr_reader :mappings

      def initialize
        @mappings = []
      end

      def map(
        name,
        to:,
        render_nil: false,
        with: {},
        delegate: nil,
        child_mappings: nil
      )
        @mappings << KeyValueMappingRule.new(
          name,
          to: to,
          render_nil: render_nil,
          with: with,
          delegate: delegate,
          child_mappings: child_mappings,
        )
      end

      alias map_element map
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lutaml-model-0.3.10 lib/lutaml/model/key_value_mapping.rb
lutaml-model-0.3.9 lib/lutaml/model/key_value_mapping.rb
lutaml-model-0.3.8 lib/lutaml/model/key_value_mapping.rb
lutaml-model-0.3.7 lib/lutaml/model/key_value_mapping.rb
lutaml-model-0.3.6 lib/lutaml/model/key_value_mapping.rb
lutaml-model-0.3.5 lib/lutaml/model/key_value_mapping.rb
lutaml-model-0.3.4 lib/lutaml/model/key_value_mapping.rb
lutaml-model-0.3.3 lib/lutaml/model/key_value_mapping.rb
lutaml-model-0.3.2 lib/lutaml/model/key_value_mapping.rb