Default spec-to-screen conversions
This commit is contained in:
parent
bb183c9869
commit
bfe42007f3
|
@ -3,6 +3,9 @@
|
||||||
(defmulti screen-from-spec (fn [spec] (:id spec)))
|
(defmulti screen-from-spec (fn [spec] (:id spec)))
|
||||||
(defmulti spec-from-screen (fn [screen] (:id screen)))
|
(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- -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)))
|
(defn- -spec-from-screen [screen] (assoc (spec-from-screen screen) :id (:id screen)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue