Sha256: b8feb31c3cd3baee41be5ec7f9b048c4f6450ba323c0e0a6fcba5a5e857d9165
Contents?: true
Size: 408 Bytes
Versions: 1
Compression:
Stored size: 408 Bytes
Contents
# frozen_string_literal: true module Koine module Attributes module Adapter class Date < Base private def coerce_not_nil(date) wrap_errors do 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
koine-attributes-1.2.4 | lib/koine/attributes/adapter/date.rb |