Class: Checkoff::SelectorClasses::Task::SectionNameStartsWithPFunctionEvaluator
- Inherits:
-
FunctionEvaluator
- Object
- FunctionEvaluator
- FunctionEvaluator
- Checkoff::SelectorClasses::Task::SectionNameStartsWithPFunctionEvaluator
- Defined in:
- lib/checkoff/internal/selector_classes/task.rb
Overview
:section_name_starts_with? function
Instance Method Summary collapse
-
#evaluate(task, section_name_prefix) ⇒ 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, section_name_prefix) ⇒ Boolean
@sg-ignore
24 25 26 27 28 29 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 24 def evaluate(task, section_name_prefix) section_names = task.memberships.map do |membership| membership.fetch('section').fetch('name') end section_names.any? { |section_name| section_name.start_with? section_name_prefix } end |
#evaluate_arg?(_index) ⇒ Boolean
16 17 18 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 16 def evaluate_arg?(_index) false end |
#matches? ⇒ Boolean
11 12 13 |
# File 'lib/checkoff/internal/selector_classes/task.rb', line 11 def matches? fn?(selector, :section_name_starts_with?) end |