Class: Checkoff::TagPFunctionEvaluator

Inherits:
FunctionEvaluator show all
Defined in:
lib/checkoff/internal/task_selector_evaluator.rb

Overview

:tag function

Instance Method Summary collapse

Methods inherited from FunctionEvaluator

#initialize

Constructor Details

This class inherits a constructor from Checkoff::FunctionEvaluator

Instance Method Details

#evaluate(task, tag_name) ⇒ Object



112
113
114
# File 'lib/checkoff/internal/task_selector_evaluator.rb', line 112

def evaluate(task, tag_name)
  task.tags.map(&:name).include? tag_name
end

#evaluate_arg?(_index) ⇒ Boolean

Returns:

  • (Boolean)


108
109
110
# File 'lib/checkoff/internal/task_selector_evaluator.rb', line 108

def evaluate_arg?(_index)
  false
end

#matches?Boolean

Returns:

  • (Boolean)


104
105
106
# File 'lib/checkoff/internal/task_selector_evaluator.rb', line 104

def matches?
  fn?(task_selector, :tag)
end