Module: FidoMetadata::Coercer::Date

Defined in:
lib/fido_metadata/coercer/date.rb

Class Method Summary collapse

Class Method Details

.coerce(value) ⇒ Object



8
9
10
11
12
# File 'lib/fido_metadata/coercer/date.rb', line 8

def self.coerce(value)
  return value if value.is_a?(::Date)

  ::Date.iso8601(value) if value
end