Created
November 19, 2009 08:03
-
-
Save hassox/238624 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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