Class: Checkoff::SelectorClasses::Task::SectionNameStartsWithPFunctionEvaluator
- Inherits:
-
FunctionEvaluator
- Object
- FunctionEvaluator
- FunctionEvaluator
- Checkoff::SelectorClasses::Task::SectionNameStartsWithPFunctionEvaluator
- Defined in:
- lib/checkoff/internal/selector_classes/task.rb,
sig/checkoff.rbs
Overview
:section_name_starts_with? function
Instance Attribute Summary
Attributes inherited from FunctionEvaluator
#custom_fields, #selector, #tasks, #timelines
Instance Method Summary collapse
-
#evaluate(task, section_name_prefix) ⇒ 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, section_name_prefix) ⇒ Boolean
sord warn - Asana::Resources::Task wasn't able to be resolved to a constant in this project @sg-ignore
@param task
@param section_name_prefix
49 50 51 52 53 54 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 49 def evaluate(task, section_name_prefix) task_data = tasks.task_to_h(task) task_data.fetch('unwrapped').fetch('membership_by_section_name').keys.any? do |section_name| String(section_name).start_with?(section_name_prefix) end end |
#evaluate_arg?(_index) ⇒ Boolean
@param _index
41 42 43 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 41 def evaluate_arg?(_index) false end |
#matches? ⇒ Boolean
36 37 38 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 36 def matches? fn?(selector, :section_name_starts_with?) end |