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

Version Path
awesome_translations-0.0.61 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.60 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.59 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.58 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.57 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.56 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.55 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.54 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.53 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.52 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.51 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.50 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.49 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.48 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.47 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.46 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.45 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.44 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.43 lib/awesome_translations/translate_functionality.rb
awesome_translations-0.0.42 lib/awesome_translations/translate_functionality.rb