lib/dry/schema/key_coercer.rb in dry-schema-1.4.3 vs lib/dry/schema/key_coercer.rb in dry-schema-1.5.0

- old
+ new

@@ -1,9 +1,9 @@ # frozen_string_literal: true -require 'dry/core/cache' -require 'dry/equalizer' +require "dry/core/cache" +require "dry/equalizer" module Dry module Schema # Coerces keys in a hash using provided coercer function # @@ -30,11 +30,11 @@ def initialize(key_map, &coercer) @key_map = key_map.coercible(&coercer) end # @api private - def call(source) - key_map.write(source.to_h) + def call(result) + key_map.write(result.to_h) end alias_method :[], :call end end end