Pathex.Builder behaviour (Pathex v1.3.0) View Source

Module for building combinations into path-closures

Link to this section Summary

Functions

This function creates quoted fn-closure from passed combination and operations

This function creates quoted path-closure which is a composition of multiple quoted paths

This function creates quoted fn-closure from passed combination and builder

Callbacks

Implementation takes combination for path-closure and returns code structure to be built into some case of path-closure

Link to this section Types

Link to this section Functions

Link to this function

build(combination, operations)

View Source

Specs

This function creates quoted fn-closure from passed combination and operations

Closure has two arguments: operation name and tuple or actual arguments

It will look like

iex> fn
  :view, {struct, fun} -> ...
  :update, {struct, fun} -> ...
  ...
end
Link to this function

build_composition(items, atom, env)

View Source

Specs

build_composition([Macro.t()], atom(), Macro.Env.t()) :: Macro.t()

This function creates quoted path-closure which is a composition of multiple quoted paths

Link to this function

build_only(combination, builder)

View Source

Specs

build_only(Pathex.Combination.t(), t()) :: Macro.t()

This function creates quoted fn-closure from passed combination and builder

Closure has as much arguments as specified builder creates

Link to this section Callbacks

Specs

Implementation takes combination for path-closure and returns code structure to be built into some case of path-closure