Class: Checkoff::SectionSelectorEvaluator

Inherits:
SelectorEvaluator show all
Defined in:
lib/checkoff/internal/section_selector_evaluator.rb,
sig/checkoff.rbs

Overview

Evaluates section selectors against a section

Constant Summary collapse

COMMON_FUNCTION_EVALUATORS =

Returns:

  • (Object)
(Checkoff::SelectorClasses::Common.constants.map do |const|
  Checkoff::SelectorClasses::Common.const_get(const)
end - [Checkoff::SelectorClasses::Common::FunctionEvaluator]).freeze
SECTION_FUNCTION_EVALUATORS =

Returns:

  • (Object)
(Checkoff::SelectorClasses::Section.constants.map do |const|
  Checkoff::SelectorClasses::Section.const_get(const)
end - [Checkoff::SelectorClasses::Section::FunctionEvaluator]).freeze
FUNCTION_EVALUATORS =

Returns:

  • (Object)
(COMMON_FUNCTION_EVALUATORS + SECTION_FUNCTION_EVALUATORS).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from SelectorEvaluator

#evaluate, #evaluate_args, #try_this_evaluator

Constructor Details

#initialize(section:, client:, projects: Checkoff::Projects.new(client:), sections: Checkoff::Sections.new(client:), custom_fields: Checkoff::CustomFields.new(client:), **_kwargs) ⇒ Object

sord warn - Asana::Resources::Section wasn't able to be resolved to a constant in this project sord warn - Asana::Client wasn't able to be resolved to a constant in this project @param section

@param client

@param projects

@param sections

@param custom_fields

@param _kwargs



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/checkoff/internal/section_selector_evaluator.rb', line 17

def initialize(section:,
               client:,
               projects: Checkoff::Projects.new(client:),
               sections: Checkoff::Sections.new(client:),
               custom_fields: Checkoff::CustomFields.new(client:),
               **_kwargs)
  @item = section
  @client = client
  @projects = projects
  @sections = sections
  @custom_fields = custom_fields
  super()
end

Instance Attribute Details

#clientAsana::Client (readonly)

sord warn - Asana::Client wasn't able to be resolved to a constant in this project

Returns:

  • (Asana::Client)


65
66
67
# File 'lib/checkoff/internal/section_selector_evaluator.rb', line 65

def client
  @client
end

#custom_fieldsCheckoff::CustomFields (readonly)



63
64
65
# File 'lib/checkoff/internal/section_selector_evaluator.rb', line 63

def custom_fields
  @custom_fields
end

#itemAsana::Resources::Project (readonly)

sord warn - Asana::Resources::Project wasn't able to be resolved to a constant in this project

Returns:

  • (Asana::Resources::Project)


57
58
59
# File 'lib/checkoff/internal/section_selector_evaluator.rb', line 57

def item
  @item
end

#projectsCheckoff::Projects (readonly)

Returns:



61
62
63
# File 'lib/checkoff/internal/section_selector_evaluator.rb', line 61

def projects
  @projects
end

#sectionsCheckoff::Sections (readonly)

Returns:



59
60
61
# File 'lib/checkoff/internal/section_selector_evaluator.rb', line 59

def sections
  @sections
end

Instance Method Details

#function_evaluatorsArray<Class<Checkoff::SelectorClasses::Project::FunctionEvaluator>>



47
48
49
# File 'lib/checkoff/internal/section_selector_evaluator.rb', line 47

def function_evaluators
  FUNCTION_EVALUATORS
end

#initializer_kwargsHash

Returns:

  • (Hash)


52
53
54
# File 'lib/checkoff/internal/section_selector_evaluator.rb', line 52

def initializer_kwargs
  { sections:, projects:, client:, custom_fields: }
end