Sha256: 1d77abeec5a4e0b8ba5786596be46a48d34a6d72b53ece80c9f3556124c8fb8c

Contents?: true

Size: 327 Bytes

Versions: 5

Compression:

Stored size: 327 Bytes

Contents

module Koine
  module Attributes
    module Adapter
      class Date < Base
        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
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
koine-attributes-1.0.0 lib/koine/attributes/adapter/date.rb
koine-attributes-0.4.0 lib/koine/attributes/adapter/date.rb
koine-attributes-0.3.2 lib/koine/attributes/adapter/date.rb
koine-attributes-0.3.1 lib/koine/attributes/adapter/date.rb
koine-attributes-0.3.0 lib/koine/attributes/adapter/date.rb