Module: TimeOfDayAttr::TimeFormat

Defined in:
lib/time_of_day_attr/time_format.rb

Class Method Summary collapse

Class Method Details

.translate_format(format) ⇒ Object



3
4
5
6
# File 'lib/time_of_day_attr/time_format.rb', line 3

def self.translate_format(format)
  translate = format.is_a?(Symbol)
  translate ? I18n.translate("time_of_day.formats.#{format}") : format
end