lib/koine/attributes/adapter/hash_of.rb in koine-attributes-0.2.3 vs lib/koine/attributes/adapter/hash_of.rb in koine-attributes-0.3.0

- old
+ new

@@ -6,10 +6,12 @@ @key_adapter = key_adapter || raise(ArgumentError, 'Invalid key adapter') @value_adapter = value_adapter || raise(ArgumentError, 'Invalid value adapter') with_default_value({}) end - def coerce(hash) + private + + def coerce_not_nil(hash) secure do {}.tap do |new_hash| hash.each do |key, value| key = @key_adapter.coerce(key) value = @value_adapter.coerce(value)