Module: Rack::DevMark::I18nHelper

Included in:
Rack::DevMark
Defined in:
lib/rack/dev-mark/i18n_helper.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/rack/dev-mark/i18n_helper.rb', line 6

def self.included(base)
  class << base
    def env_with_i18n
      s = env_without_i18n
      ::I18n.translate(s, scope: 'rack_dev_mark', default: s)
    end
    alias_method :env_without_i18n, :env
    alias_method :env, :env_with_i18n
  end
end