Class: Common::ISO8601Time

Inherits:
Virtus::Attribute
  • Object
show all
Defined in:
lib/common/models/attribute_types/iso8601_time.rb

Instance Method Summary collapse

Instance Method Details

#coerce(value) ⇒ Object



5
6
7
# File 'lib/common/models/attribute_types/iso8601_time.rb', line 5

def coerce(value)
  Time.iso8601(value) if value.is_a?(String)
end