Liking cljdoc? Tell your friends :D

factory-squid.core


add-post-build-fnclj/s

(add-post-build-fn factory post-build-fn)

Add the given post-build function to the factory.

After the product is built, the post-build functions will be applied sequentially.

A post-build function should be of arity 2, with the first argument being the product and the second argument being the factory map.

Add the given post-build function to the factory.

After the product is built, the post-build functions will be applied sequentially.

A post-build function should be of arity 2, with the first argument being
the product and the second argument being the factory map.
raw docstring

add-traitclj/s

(add-trait factory trait-name trait-params)

Add the given trait to the factory.

Trait params could be applied to the factory with the trait function.

Add the given trait to the factory.

Trait params could be applied to the factory with the `trait` function.
raw docstring

buildclj/s

(build {:keys [factory-fn spec fields post-build-fns] :as factory})

Build a product with the factory.

The products will be builts with the following step:

  1. the factory map will be supplied to factory-fn producing a product
  2. fields will be merged recursively to the product
  3. post-build-fns will be applied to the product sequentially
  4. the product will be validated against spec
Build a product with the factory.

The products will be builts with the following step:

1. the factory map will be supplied to `factory-fn` producing a product
2. `fields` will be merged recursively to the product
3. `post-build-fns` will be applied to the product sequentially
4. the product will be validated against `spec`
raw docstring

build-argsclj/s

(build-args factory build-args)

Add the given build arguments to the factory. Existing build argument of the same key will be overriden.

Build arguments will be supllied to factory-fn when building.

Add the given build arguments to the factory.
Existing build argument of the same key will be overriden.

Build arguments will be supllied to `factory-fn` when building.
raw docstring

deep-mergeclj/s

(deep-merge l r)

Recursively merge two maps.

Recursively merge two maps.
raw docstring

fieldsclj/s

(fields factory fields)

Add the given fields to the factory. The new fields will be merged recursively to the existing fields.

Fields will be merged recursively to the products when building.

Add the given fields to the factory.
The new fields will be merged recursively to the existing fields.

Fields will be merged recursively to the products when building.
raw docstring

specclj/s

(spec factory spec-object)

Apply the given spec to the factory.

Products will be validated against the spec when building.

Apply the given spec to the factory.

Products will be validated against the spec when building.
raw docstring

traitclj/s

(trait factory trait-name)

Apply trait of the given name to the factory.

Throw if a trait of the give name was not defined.

Apply trait of the given name to the factory.

Throw if a trait of the give name was not defined.
raw docstring

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

× close