Sha256: 1fb9a6cb1b49b5401b0684d626e73726fb104375b73b8bf844497a988cc02dd7

Contents?: true

Size: 348 Bytes

Versions: 6

Compression:

Stored size: 348 Bytes

Contents

module Hyperloop
  class Component
    module Mixin
      def t(attribute, opts = {})
        namespace = self.class.name.underscore.gsub(%r{::|/}, '.')

        HyperI18n::I18n.t("#{namespace}.#{attribute}", opts)
      end

      def l(time, format = :default, opts = {})
        HyperI18n::I18n.l(time, format, opts)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hyper-i18n-0.99.6 lib/hyper-i18n/hyperloop/component/mixin.rb
hyper-i18n-0.99.5 lib/hyper-i18n/hyperloop/component/mixin.rb
hyper-i18n-0.99.4 lib/hyper-i18n/hyperloop/component/mixin.rb
hyper-i18n-0.99.3 lib/hyper-i18n/hyperloop/component/mixin.rb
hyper-i18n-0.99.2 lib/hyper-i18n/hyperloop/component/mixin.rb
hyper-i18n-0.99.1 lib/hyper-i18n/hyperloop/component/mixin.rb