Skip to content

Instantly share code, notes, and snippets.

@hassox
Created November 19, 2009 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hassox/238624 to your computer and use it in GitHub Desktop.
Save hassox/238624 to your computer and use it in GitHub Desktop.
class MyCustomAroundMiddleware
def initialize(app)
@app = app
end
def call(env)
response = nil
# stuff to do before the request
my_around do
# stuff
another_around do
# more stuff
response = @app.call(env)
end
end
response
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment