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

- old
+ new

@@ -1,9 +1,11 @@ module Koine module Attributes module Adapter class Date < Base - def coerce(date) + private + + def coerce_not_nil(date) secure do next date if date.is_a?(::Date) next date.to_date if date.is_a?(::Time) ::Date.parse(date) end