lib/checkoff/internal/task_selector_evaluator.rb in checkoff-0.30.0 vs lib/checkoff/internal/task_selector_evaluator.rb in checkoff-0.31.0

- old
+ new

@@ -123,10 +123,21 @@ def evaluate(task) @tasks.task_ready?(task) end end + # :due_date_set function + class DueDateSetPFunctionEvaluator < FunctionEvaluator + def matches? + fn?(task_selector, :due_date_set) + end + + def evaluate(task) + !task.due_at.nil? || !task.due_on.nil? + end + end + # :custom_field_value function class CustomFieldValueFunctionEvaluator < FunctionEvaluator def matches? fn?(task_selector, :custom_field_value) end @@ -218,9 +229,10 @@ CustomFieldGidValueFunctionEvaluator, CustomFieldGidValueContainsAnyGidFunctionEvaluator, CustomFieldGidValueContainsAllGidsFunctionEvaluator, AndFunctionEvaluator, DuePFunctionEvaluator, + DueDateSetPFunctionEvaluator, ].freeze def evaluate(task_selector) return true if task_selector == []