Funx.Predicate.LessThanOrEqual (funx v0.8.4)
View SourcePredicate that checks if a value is less than or equal to a reference value
using an Ord comparator.
Options
:value(required) The reference value to compare against.:ord(optional) An ordering comparator. Defaults toFunx.Ord.Protocol.
Examples
use Funx.Predicate
# Check if score is at most 100
pred do
check :score, {LessThanOrEqual, value: 100}
end
# With custom Ord comparator
pred do
check :date, {LessThanOrEqual, value: deadline, ord: Date.Ord}
end