Liking cljdoc? Tell your friends :D

hara.object.framework.access


getclj

(get obj k)

accessor with either keyword or array lookup

(access/get (test.Cat. "spike") :name) => "spike"

accessor with either keyword or array lookup

(access/get (test.Cat. "spike") :name)
=> "spike"
raw docstring

get-inclj

(get-in obj ks)

accesses the nested object using specifiedb path

(access/get-in (test.Cat. "spike") [:name])

accesses the nested object using specifiedb path

(access/get-in (test.Cat. "spike") [:name])
raw docstring

get-with-arrayclj

(get-with-array obj arr)

access the fields of an object with an array of keywords

(get-with-array {:a 1} [:a]) => {:a 1}

(get-with-array (test.Cat. "spike") [:name]) => {:name "spike"}

access the fields of an object with an array of keywords

(get-with-array {:a 1} [:a])
=> {:a 1}

(get-with-array (test.Cat. "spike")
                [:name])
=> {:name "spike"}
raw docstring

get-with-keywordclj

(get-with-keyword obj k)

access the fields of an object with keyword

(get-with-keyword {:a 1} :a) => 1

(get-with-keyword (test.Cat. "spike") :name) => "spike"

access the fields of an object with keyword

(get-with-keyword {:a 1} :a)
=> 1

(get-with-keyword (test.Cat. "spike")
                  :name)
=> "spike"
raw docstring

keysclj

(keys obj)

gets all keys of an object

(access/keys (test.Cat. "spike")) => (contains [:name])

gets all keys of an object

(access/keys (test.Cat. "spike"))
=> (contains [:name])
raw docstring

meta-clearclj

(meta-clear class)

clears all meta-read and meta-write definitions for a class

clears all meta-read and meta-write definitions for a class
raw docstring

setclj

(set obj m)
(set obj k v)

sets the fields of an object with a map

(-> (doto (test.Cat. "spike") (access/set {:name "fluffy"})) (access/get :name)) => "fluffy"

sets the fields of an object with a map

(-> (doto (test.Cat. "spike")
      (access/set {:name "fluffy"}))
    (access/get :name))
=> "fluffy"
raw docstring

set-with-keywordclj

(set-with-keyword obj k v)

sets the fields of an object with keyword

(hara.object.framework/map-like test.Cat {:tag "cat" :read :all :write :all})

(-> (doto (test.Cat. "spike") (set-with-keyword :name "fluffy")) (access/get :name)) => "fluffy"

sets the fields of an object with keyword

(hara.object.framework/map-like
 test.Cat
 {:tag "cat"
  :read :all
  :write :all})

(-> (doto (test.Cat. "spike")
      (set-with-keyword :name "fluffy"))
    (access/get :name))
=> "fluffy"
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close