Skip to content

Instantly share code, notes, and snippets.

@Raynes Raynes/core.clj
Created Dec 26, 2011

Embed
What would you like to do?
(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
You can’t perform that action at this time.