Sha256: 1cf41f390e5c32d4c620e766bffc65d41f14eb640c8c73feea76c42ba4426acb

Contents?: true

Size: 352 Bytes

Versions: 8

Compression:

Stored size: 352 Bytes

Contents

# frozen_string_literal: true

module Fortnox
  module API
    module Mapper
      Hash = lambda do |hash|
        hash.each do |key, value|
          name = Fortnox::API::Mapper::Base.canonical_name_sym(value)
          hash[key] = Fortnox::API::Registry[name].call(value)
        end
      end

      Registry.register(:hash, Hash)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fortnox-api-0.9.1 lib/fortnox/api/mappers/value/hash.rb
fortnox-api-0.8.2 lib/fortnox/api/mappers/value/hash.rb
fortnox-api-0.8.1 lib/fortnox/api/mappers/value/hash.rb
fortnox-api-0.9.0 lib/fortnox/api/mappers/value/hash.rb
fortnox-api-0.8.0 lib/fortnox/api/mappers/value/hash.rb
fortnox-api-0.7.2 lib/fortnox/api/mappers/value/hash.rb
fortnox-api-0.7.1 lib/fortnox/api/mappers/value/hash.rb
fortnox-api-0.7.0 lib/fortnox/api/mappers/value/hash.rb