Sha256: 17521834653cdf778ef3ef5cf217beae1596a94d9ff255b08ee5067f11604c86

Contents?: true

Size: 585 Bytes

Versions: 22

Compression:

Stored size: 585 Bytes

Contents

# frozen_string_literal: true

require_relative 'resource_converter_type'

module LedgerSync
  module Util
    class ResourceConverter
      module Type
        class ReferencesManyType < ResourceConverterType
          def cast_value(args = {})
            destination = args.fetch(:destination)
            values = args.fetch(:value)

            return if values.nil?

            values.map do |value|
              super(
                destination: destination,
                value: value
              )
            end
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
ledger_sync-2.6.0 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.5.0 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.4.4 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.3.1 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.2.3 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.2.1 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.2.0 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.0.2 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.0.1 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.0.0 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-2.0.0.pre.1 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-1.8.1 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-1.8.0 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-1.7.0 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-1.6.0 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-1.5.2 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-1.5.1 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-1.5.0 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-1.4.4 lib/ledger_sync/util/resource_converter/type/references_many_type.rb
ledger_sync-1.4.2 lib/ledger_sync/util/resource_converter/type/references_many_type.rb