Class: Wurk::Middleware::I18n::Server
- Inherits:
-
Object
- Object
- Wurk::Middleware::I18n::Server
- Includes:
- ServerMiddleware
- Defined in:
- lib/wurk/middleware/i18n.rb
Overview
Server: scopes the job execution to the captured locale. Restores the previous value on the way out so middleware stacking doesn’t leak across jobs in the same thread.
Instance Attribute Summary
Attributes included from ServerMiddleware
Instance Method Summary collapse
Methods included from ServerMiddleware
Instance Method Details
#call(_job_instance, job, _queue) ⇒ Object
54 55 56 |
# File 'lib/wurk/middleware/i18n.rb', line 54 def call(_job_instance, job, _queue, &) I18n.with_locale(job['locale'], &) end |