Module: ConstEnum::WithI18n

Extended by:
ActiveSupport::Concern
Defined in:
lib/const_enum/with_i18n.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

DEFAULT_OPTIONS =
{ :key => 'labels'}

Instance Method Summary collapse

Instance Method Details

#labelObject



14
15
16
# File 'lib/const_enum/with_i18n.rb', line 14

def label
  I18n.t(build_key(@attributes.second || key.to_s.downcase))
end