Sha256: 8c62898b74892472e1e099fd0cbf1d885d5bd585783562c4767f88aabf6f1f57
Contents?: true
Size: 536 Bytes
Versions: 22
Compression:
Stored size: 536 Bytes
Contents
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
22 entries across 22 versions & 2 rubygems