Class: Checkoff::SelectorClasses::Task::InProjectNamedPFunctionEvaluator
- Inherits:
-
FunctionEvaluator
- Object
- FunctionEvaluator
- FunctionEvaluator
- Checkoff::SelectorClasses::Task::InProjectNamedPFunctionEvaluator
- Defined in:
- lib/checkoff/internal/selector_classes/task.rb
Overview
:in_project_named? function
Instance Method Summary collapse
-
#evaluate(task, project_name) ⇒ Boolean
@sg-ignore.
- #evaluate_arg?(_index) ⇒ Boolean
- #matches? ⇒ Boolean
Methods inherited from FunctionEvaluator
Constructor Details
This class inherits a constructor from Checkoff::SelectorClasses::Task::FunctionEvaluator
Instance Method Details
#evaluate(task, project_name) ⇒ Boolean
@sg-ignore
70 71 72 73 74 75 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 70 def evaluate(task, project_name) project_names = task.memberships.map do |membership| membership.fetch('project').fetch('name') end project_names.include? project_name end |
#evaluate_arg?(_index) ⇒ Boolean
62 63 64 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 62 def evaluate_arg?(_index) false end |
#matches? ⇒ Boolean
57 58 59 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 57 def matches? fn?(selector, :in_project_named?) end |