lib/koine/attributes/adapter/hash_of.rb in koine-attributes-0.3.2 vs lib/koine/attributes/adapter/hash_of.rb in koine-attributes-0.4.0
- old
+ new
@@ -6,9 +6,17 @@
@key_adapter = key_adapter || raise(ArgumentError, 'Invalid key adapter')
@value_adapter = value_adapter || raise(ArgumentError, 'Invalid value adapter')
with_default_value({})
end
+ def for_keys
+ @key_adapter
+ end
+
+ def for_values
+ @value_adapter
+ end
+
private
def coerce_not_nil(hash)
secure do
{}.tap do |new_hash|