Class: Sail::Types::Date

Inherits:
Type
  • Object
show all
Defined in:
lib/sail/types/date.rb

Overview

Date

The Date type parses the saved string into a DateTime object.

Instance Method Summary collapse

Methods inherited from Type

#from, #initialize

Constructor Details

This class inherits a constructor from Sail::Types::Type

Instance Method Details

#to_valueObject



10
11
12
# File 'lib/sail/types/date.rb', line 10

def to_value
  DateTime.parse(@setting.value).utc
end