Class: JSONAPI::Consumer::Schema::Types::Time

Inherits:
Object
  • Object
show all
Defined in:
lib/jsonapi/consumer/schema.rb

Class Method Summary collapse

Class Method Details

.cast(value, _) ⇒ Object



24
25
26
# File 'lib/jsonapi/consumer/schema.rb', line 24

def self.cast(value, _)
  value.is_a?(::Time) ? value : ::Time.parse(value)
end