module DateAsString::Formats
Public Class Methods
find_format(format_string)
click to toggle source
# File lib/date_as_string/formats.rb, line 3 def self.find_format(format_string) case format_string when :mm_dd_yyyy Format1 when :mm_dd_yy Format2 when :mmddyyyy Format3 when :mmddyy Format4 when :t_pmd Format5 else raise TypeError.new("Format does not exist: #{format_string}") end end