Created
December 26, 2011 16:59
-
-
Save Raynes/1521648 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
(defn ^{:skip-wiki true} route->name | |
"Parses a set of route args into the keyword name for the route" | |
[route] | |
(cond | |
(keyword? route) route | |
(fn? route) (keyword (:name (meta route))) | |
:else (let [res (first (parse-route [{} [route]] 'compojure.core/GET))] | |
(keyword (:fn-name res))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment