Created
March 17, 2012 03:59
-
-
Save qmx/2054807 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
# Option 1 or 2? | |
# 1 | |
return @app.call(env) if @exclude && @exclude.call(env) | |
# 2 | |
if @exclude && @exclude.call(env) | |
return @app.call(env) | |
end | |
#3 | |
def excluded?(env) # it would be a lot better to have a meaningful name for this | |
@exclude && @exclude.call(env) | |
end | |
return @app.call(env) if excluded?(env) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment