Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/avm/patches/object/i18n.rb
Instance Method Summary collapse
- #translate(entry_suffix, values = {}) ⇒ Object
- #translate_entry_full(entry_suffix) ⇒ Object
- #translate_entry_self_prefix ⇒ Object
Instance Method Details
#translate(entry_suffix, values = {}) ⇒ Object
6 7 8 |
# File 'lib/avm/patches/object/i18n.rb', line 6 def translate(entry_suffix, values = {}) ::I18n.translate(translate_entry_full(entry_suffix), values) end |
#translate_entry_full(entry_suffix) ⇒ Object
10 11 12 |
# File 'lib/avm/patches/object/i18n.rb', line 10 def translate_entry_full(entry_suffix) "#{translate_entry_self_prefix}.#{entry_suffix}" end |
#translate_entry_self_prefix ⇒ Object
14 15 16 |
# File 'lib/avm/patches/object/i18n.rb', line 14 def translate_entry_self_prefix self.class.name.underscore.gsub('/', '.') end |