Sha256: d3f3c3fb3233a80698ae40ad5cc9970f5491a6634be374fa1f00a5f219c5cf64
Contents?: true
Size: 554 Bytes
Versions: 62
Compression:
Stored size: 554 Bytes
Contents
# encoding: utf-8 module WebTranslateIt # Class to automatically fetch the last translations from Web Translate It # for every page requested. # This can be used as a rack middleware. # Implementation example: # # # in config/environment.rb: # config.middleware.use "WebTranslateIt::AutoFetch" # class AutoFetch def initialize(app) @app = app end def call(env) WebTranslateIt::fetch_translations status, headers, response = @app.call(env) [status, headers, response.body] end end end
Version data entries
62 entries across 62 versions & 1 rubygems