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 Attribute Summary
Attributes inherited from FunctionEvaluator
#custom_fields, #tasks, #timelines
Instance Method Summary collapse
-
#evaluate(task, project_name) ⇒ Boolean
@sg-ignore.
- #evaluate_arg?(_index) ⇒ Boolean
- #matches? ⇒ Boolean
Methods inherited from FunctionEvaluator
Methods included from Logging
#debug, #error, #finer, #info, #logger, #warn
Constructor Details
This class inherits a constructor from Checkoff::SelectorClasses::Task::FunctionEvaluator
Instance Method Details
#evaluate(task, project_name) ⇒ Boolean
@sg-ignore
93 94 95 96 97 98 99 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 93 def evaluate(task, project_name) project_names = task.memberships.map do |membership| m = T.cast(membership, T::Hash[String, T.untyped]) T.cast(m.fetch('project'), T::Hash[String, T.untyped]).fetch('name') end T.cast(project_names.include?(project_name), T::Boolean) end |
#evaluate_arg?(_index) ⇒ Boolean
85 86 87 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 85 def evaluate_arg?(_index) false end |
#matches? ⇒ Boolean
80 81 82 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 80 def matches? fn?(selector, :in_project_named?) end |