# File 'lib/sinatra/params/array.rb', line 4defself.convert_to(type)table={Array=>:to_a,String=>:to_s,Date=>:to_date,DateTime=>:to_datetime}table[type]end
Instance Method Details
#to_date ⇒ Object
15
16
17
# File 'lib/sinatra/params/array.rb', line 15defto_dateDate.parse(self.join('-'))end
#to_datetime ⇒ Object
19
20
21
# File 'lib/sinatra/params/array.rb', line 19defto_datetimeDateTime.parse(self.join('-'))end