View Source Predicated (predicated v1.1.2)

Summary

Functions

Compiles the final result of testing all the predicates

Evaluates a predicate's condition

Constructs the path used to query into the subject and extracts the expression from the subject based on that path.

Functions

Link to this function

compile(list, arg2, acc)

View Source

Compiles the final result of testing all the predicates

Evaluates a predicate's condition

Link to this function

path_and_value(identifier, subject)

View Source

Constructs the path used to query into the subject and extracts the expression from the subject based on that path.

iex> Predicated.path_and_value("person.first_name", %{person: %{first_name: "Bob"}})
{[:person, :first_name], "Bob"}

iex> Predicated.path_and_value("first_name", %{first_name: "Bob"})
{[:first_name], "Bob"}
Link to this function

test(predicates, subject, acc \\ [])

View Source

Tests a predicate