Module: Lita::Handler::Common::ClassMethods
- Defined in:
- lib/lita/handler/common.rb
Overview
Common class-level methods for all handlers.
Instance Method Summary collapse
-
#translate(key, hash = {}) ⇒ String
(also: #t)
Returns the translation for a key, automatically namespaced to the handler.
Instance Method Details
#translate(key, hash = {}) ⇒ String Also known as: t
Returns the translation for a key, automatically namespaced to the handler.
21 22 23 |
# File 'lib/lita/handler/common.rb', line 21 def translate(key, hash = {}) I18n.translate("lita.handlers.#{namespace}.#{key}", hash) end |