Class: Checkoff::SelectorClasses::Task::InProjectNamedPFunctionEvaluator
- Inherits:
-
FunctionEvaluator
- Object
- FunctionEvaluator
- FunctionEvaluator
- Checkoff::SelectorClasses::Task::InProjectNamedPFunctionEvaluator
- Defined in:
- lib/checkoff/internal/selector_classes/task.rb,
sig/checkoff.rbs
Overview
:in_project_named? function
Instance Attribute Summary
Attributes inherited from FunctionEvaluator
#custom_fields, #selector, #tasks, #timelines
Instance Method Summary collapse
-
#evaluate(task, project_name) ⇒ Boolean
sord warn - Asana::Resources::Task wasn't able to be resolved to a constant in this project @sg-ignore.
-
#evaluate_arg?(_index) ⇒ Boolean
@param
_index. - #matches? ⇒ Boolean
Methods inherited from FunctionEvaluator
Methods inherited from FunctionEvaluator
#debug, #error, #finer, #fn?, #info, #log_level, #logger, #warn
Methods included from Logging
#debug, #error, #finer, #info, #log_level, #logger, #warn
Constructor Details
This class inherits a constructor from Checkoff::SelectorClasses::Task::FunctionEvaluator
Instance Method Details
#evaluate(task, project_name) ⇒ Boolean
sord warn - Asana::Resources::Task wasn't able to be resolved to a constant in this project @sg-ignore
@param task
@param project_name
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
@param _index
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 |