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.
sourceraw 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.
sourceraw docstring

buildclj/s

(build factory)
(build factory -build-args)

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`
sourceraw 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.
sourceraw docstring

deep-mergeclj/s

(deep-merge l r)

Recursively merge two maps.

Recursively merge two maps.
sourceraw 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.
sourceraw 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.
sourceraw 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.
sourceraw docstring

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

× close