Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/utilities.rb

Instance Method Summary collapse

Instance Method Details

#to_dateObject

Transform self to a Date



43
44
45
# File 'lib/utilities.rb', line 43

def to_date
  Date.parse(self)
end

#to_timeObject

Transform self to a Time



48
49
50
# File 'lib/utilities.rb', line 48

def to_time
  Time.parse(self)
end