Merge pull request #83 from kenrestivo/master

Add docstring for defstate
This commit is contained in:
Anatoly 2017-08-28 12:48:18 -04:00 committed by GitHub
commit 8bb5e19303

View file

@ -160,7 +160,11 @@
(up s-name with-inst (atom #{}))))) (up s-name with-inst (atom #{})))))
#?(:clj #?(: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) (let [[state params] (macro/name-with-attributes state body)
{:keys [start stop] :as lifecycle} (apply hash-map params) {:keys [start stop] :as lifecycle} (apply hash-map params)
state-name (with-ns *ns* state) state-name (with-ns *ns* state)