Sha256: 15353f6f8350b4251095d8baac5ee44a43737e88940b799500a9d46cc566c183
Contents?: true
Size: 461 Bytes
Versions: 6
Compression:
Stored size: 461 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, **opts, &blk) AwesomeTranslations::GlobalTranslator.translate(key, caller_number: 1, translation_args: args, translation_opts: opts, &blk) end end end
Version data entries
6 entries across 6 versions & 1 rubygems