Class: Kozo::Types::Time

Inherits:
Kozo::Type show all
Defined in:
lib/kozo/types/time.rb

Class Method Summary collapse

Methods inherited from Kozo::Type

lookup

Class Method Details

.cast(value) ⇒ Object



6
7
8
9
10
11
# File 'lib/kozo/types/time.rb', line 6

def self.cast(value)
  return unless value
  return value if value.is_a?(::Time)

  ::Time.parse(value)
end