module Hyperloop::Component::Mixin

Public Instance Methods

l(time, format = :default, opts = {}) click to toggle source
# File lib/hyper-i18n/hyperloop/component/mixin.rb, line 10
def l(time, format = :default, opts = {})
  HyperI18n::I18n.l(time, format, opts)
end
t(attribute, opts = {}) click to toggle source
# File lib/hyper-i18n/hyperloop/component/mixin.rb, line 4
def t(attribute, opts = {})
  namespace = self.class.name.underscore.gsub(%r{::|/}, '.')

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