Lex::Conditioner
Conditioner is an extension that can check conditions of the previous results to determine if the relationship should continue. It gives you the ability to have an unlimited number of nested ANDs + ORs to make complete conditions
Conditions are added to the relationships table under the conditions column and are formatted in json.
Nested values are translated to dot patterns
Matchers
equal?(fact, value, values) # are the two values equal including class
not_equal?(fact, value, values) # are the two values no equal
nil?(fact, values) # checks if the value doesn't exist
not_nil?(fact, values) # checks if the value exists
is_false?(fact, values) # checks if the value is false
is_true?(fact, values) # checks if the value if true
is_array?(fact, values) # checks if the value is an array
is_string?(fact, values) # checks if the value is a string
is_integer(fact, values) # checks if the value is a number
The operator when creating conditions is equal to the method name without the ? so equal? becomes equal, is_true? becomes is_true
Examples
Â