Created
August 1, 2016 00:28
-
-
Save pete/dffed6d4c513c3877a1ab4cc9b8b6c30 to your computer and use it in GitHub Desktop.
Basic no-op version of Rack Middleware
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 SomeMiddleware | |
attr_accessor :app | |
def initialize app | |
# The arguments passed to use() will end up here. | |
self.app = app | |
end | |
def call env | |
# This gets called when there's a request. It | |
# works like a pipeline. | |
@app.call env | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment