Created
February 5, 2013 10:40
-
-
Save spinscale/4713643 to your computer and use it in GitHub Desktop.
spark-groovy-jrebel-first-closure-get
This file contains hidden or 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
def get(String path, Closure closure) { | |
Spark.get(new Route(path) { | |
def handle(Request request, Response response) { | |
closure.delegate = this | |
return closure.call(request, response) | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment