From 31e0b689184814ec1bc9abd307c32dbe3b3f39f2 Mon Sep 17 00:00:00 2001 From: ken restivo Date: Mon, 1 May 2017 21:38:11 -0700 Subject: [PATCH] Add docstring. --- src/mount/core.cljc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mount/core.cljc b/src/mount/core.cljc index e6c9eb2..466fcf8 100644 --- a/src/mount/core.cljc +++ b/src/mount/core.cljc @@ -160,7 +160,11 @@ (up s-name with-inst (atom #{}))))) #?(:clj - (defmacro defstate [state & body] + (defmacro defstate + "Defines a state. Restarts on recompilation. + Pass ^{:on-reload :noop} to prevent auto-restart + on ns recompilation, or :stop to stop on recompilation." + [state & body] (let [[state params] (macro/name-with-attributes state body) {:keys [start stop] :as lifecycle} (apply hash-map params) state-name (with-ns *ns* state)