Sha256: 0a8e5af6b78099dc16f0fefef5087cd96a522c67cd4004d8630e786309473964
Contents?: true
Size: 376 Bytes
Versions: 15
Compression:
Stored size: 376 Bytes
Contents
require_relative 'callback' module Async class Middleware def initialize(app) @app = app end def last_response callback.response end def callback @callback ||= Callback.new end def call(env) env['async.callback'] = callback catch(:async) do @app.call env end [200, {}, []] end end end
Version data entries
15 entries across 15 versions & 1 rubygems