Module: Enumattr::Ext::Name::Decorator

Defined in:
lib/enumattr-ext/name.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



54
55
56
57
58
# File 'lib/enumattr-ext/name.rb', line 54

def name
  default = @extras.first || key.to_s
  scope = ["enumattr.#{@container.base.name}.#{@container.enumattr}"]
  I18n.translate(key, :scope => scope, :default => default)
end