module ConstEnum::WithI18n
Constants
- DEFAULT_OPTIONS
Public Instance Methods
label()
click to toggle source
# File lib/const_enum/with_i18n.rb, line 14 def label I18n.t(build_key(@attributes.second || key.to_s.downcase)) end
Private Instance Methods
build_key(key)
click to toggle source
# File lib/const_enum/with_i18n.rb, line 19 def build_key(key) "#{self.class.i18n_options[:key]}.#{key}" end