From bfe42007f3b5c226f6e7af79d6ae449bf471e996 Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Tue, 19 Mar 2013 21:49:38 -0400 Subject: [PATCH] Default spec-to-screen conversions --- src/hottub/screen.clj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hottub/screen.clj b/src/hottub/screen.clj index 47702e9..1793f9e 100644 --- a/src/hottub/screen.clj +++ b/src/hottub/screen.clj @@ -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)))