Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/sinatra/params/string.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#to_date ⇒ Object
18 19 20 |
# File 'lib/sinatra/params/string.rb', line 18 def to_date Date.parse(self) end |
#to_datetime ⇒ Object
26 27 28 |
# File 'lib/sinatra/params/string.rb', line 26 def to_datetime DateTime.parse(self) end |
#to_time ⇒ Object
22 23 24 |
# File 'lib/sinatra/params/string.rb', line 22 def to_time self.to_datetime.to_time end |