Method: Dynamoid::TypeCasting::DateTypeCaster#process

Defined in:
lib/dynamoid/type_casting.rb

#process(value) ⇒ Object



257
258
259
260
261
262
263
264
265
266
267
# File 'lib/dynamoid/type_casting.rb', line 257

def process(value)
  if !value.respond_to?(:to_date)
    nil
  else
    begin
      value.to_date
    rescue StandardError
      nil
    end
  end
end