README.md in koine-attributes-0.3.2 vs README.md in koine-attributes-0.4.0
- old
+ new
@@ -116,9 +116,15 @@
attribute :price, MyCustom::Money.new
attribute :available, :boolean, ->(attribues){ attributes.with_default_value(true) }
attribute :available, Koine::Attributes::Drivers::Boolean.new.with_default_value(true)
attribute :tags, array_of(:string)
attribute :config, hash_of(:symbol, :string)
+
+ # if you want to costumize the above
+ attribute :config, hash_of(:symbol, :string) do |adapter|
+ adapter.for_keys.with_nil_value
+ adapter.for_values.with_nil_value
+ end
end
end
product = Product.new