class Time

Public Class Methods

convert_to(type) click to toggle source
# File lib/sinatra/params/time.rb, line 4
def self.convert_to(type)
    table = {
        String => :to_s,
        Integer => :to_i,
        Float => :to_f,
        Array => :to_a,
        Date => :to_date,
        DateTime => :to_datetime,
        Time => :to_time
    }

    table[type]
end