Class: RubyApp::Rack::Language
Instance Method Summary collapse
- #call(environment) ⇒ Object
-
#initialize(application) ⇒ Language
constructor
A new instance of Language.
Constructor Details
#initialize(application) ⇒ Language
Returns a new instance of Language.
8 9 10 |
# File 'lib/ruby_app/rack/language.rb', line 8 def initialize(application) @application = application end |
Instance Method Details
#call(environment) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/ruby_app/rack/language.rb', line 12 def call(environment) RubyApp::Language.load!(RubyApp::Request.language) begin # RubyApp::Log.debug("LANGUAGE #{RubyApp::Language.locale.code}") return @application.call(environment) ensure RubyApp::Language.unload! end end |