From a440fc47a65341c1a8f92d06f3d46d087f27ae8d Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 18 Nov 2022 10:38:39 +0100 Subject: [PATCH] Use defn instead of multimethod for load-as-edn --- src/main/clj/dda/c4k_common/yaml.clj | 4 +--- src/main/cljs/dda/c4k_common/yaml.cljs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/clj/dda/c4k_common/yaml.clj b/src/main/clj/dda/c4k_common/yaml.clj index ecc7af9..5e8edd3 100644 --- a/src/main/clj/dda/c4k_common/yaml.clj +++ b/src/main/clj/dda/c4k_common/yaml.clj @@ -38,7 +38,5 @@ (defmethod load-resource :clj [resource-name] (slurp (io/resource resource-name))) -(defmulti load-as-edn dispatch-by-resource-name) - -(defmethod load-as-edn :clj [resource-name] +(defn load-as-edn [resource-name] (from-string (load-resource resource-name))) \ No newline at end of file diff --git a/src/main/cljs/dda/c4k_common/yaml.cljs b/src/main/cljs/dda/c4k_common/yaml.cljs index 33fd5c8..14e1408 100644 --- a/src/main/cljs/dda/c4k_common/yaml.cljs +++ b/src/main/cljs/dda/c4k_common/yaml.cljs @@ -24,7 +24,5 @@ (defmulti load-resource dispatch-by-resource-name) -(defmulti load-as-edn dispatch-by-resource-name) - -(defmethod load-as-edn :default [resource-name] +(defn load-as-edn [resource-name] (from-string (load-resource resource-name)))