Skip to content

Instantly share code, notes, and snippets.

@BenoitMC
Created April 22, 2013 19:32
Show Gist options
  • Save BenoitMC/5437814 to your computer and use it in GitHub Desktop.
Save BenoitMC/5437814 to your computer and use it in GitHub Desktop.
rack middleware template
class MyMiddleware
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
# ...
return [status, headers, body]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment