Default spec-to-screen conversions

This commit is contained in:
Jeremy Penner 2013-03-19 21:49:38 -04:00
parent bb183c9869
commit bfe42007f3

View file

@ -3,6 +3,9 @@
(defmulti screen-from-spec (fn [spec] (:id spec)))
(defmulti spec-from-screen (fn [screen] (:id screen)))
(defmethod spec-from-screen :default [screen] {})
(defmethod screen-from-spec :default [spec] spec)
(defn- -screen-from-spec [spec] (assoc (screen-from-spec spec) :id (:id spec)))
(defn- -spec-from-screen [screen] (assoc (spec-from-screen screen) :id (:id screen)))