Back

ref? (clj)

(source)

function

(ref? x)
Return true if its argument is a ref.

Examples

integrant
(ns integrant.core-test
  (:require #?(:clj  [clojure.test :refer [are deftest is testing]]
               :cljs [cljs.test :refer-macros [are deftest is testing]])
            [integrant.core :as ig]
            [weavejester.dependency :as dep]))

(deftest ref-test
  (is (ig/ref? (ig/ref ::foo)))
  (is (ig/ref? (ig/ref [::foo ::bar])))
  (is (ig/reflike? (ig/ref ::foo)))
  (is (ig/reflike? (ig/ref [::foo ::bar]))))
samply/blaze
(ns blaze.rest-api.spec
  (:require
   [blaze.executors :as ex]
   [blaze.spec]
   [buddy.auth.protocols :as p]
   [clojure.spec.alpha :as s]
   [integrant.core :as ig]))

(s/def :blaze.rest-api.interaction/handler
  (s/or :ref ig/ref? :handler fn?))

(s/def :blaze.rest-api.compartment/search-handler
  (s/or :ref ig/ref? :handler fn?))

(s/def :blaze.rest-api.operation/system-handler
  (s/or :ref ig/ref? :handler fn?))

(s/def :blaze.rest-api.operation/type-handler
  (s/or :ref ig/ref? :handler fn?))

(s/def :blaze.rest-api.operation/instance-handler
  (s/or :ref ig/ref? :handler fn?))