Sha256: 6228ecac4f831984e74df30ce60fe1c084a4e93afee50e7a8821579efe619d55
Contents?: true
Size: 435 Bytes
Versions: 47
Compression:
Stored size: 435 Bytes
Contents
# Include this module to get access to the t-method. module AwesomeTranslations::TranslateFunctionality # Implements the method on both class- and instance-level. def self.included(base) base.__send__(:include, Methods) base.extend Methods end module Methods def t(key, args = {}, &blk) AwesomeTranslations::GlobalTranslator.translate(key, translation_args: [args], caller_number: 1, &blk) end end end
Version data entries
47 entries across 47 versions & 1 rubygems