Class: Checkoff::SelectorClasses::Task::TagPFunctionEvaluator

Inherits:
FunctionEvaluator show all
Defined in:
lib/checkoff/internal/selector_classes/task.rb,
sig/checkoff.rbs

Overview

:tag? function

Instance Attribute Summary

Attributes inherited from FunctionEvaluator

#custom_fields, #selector, #tasks, #timelines

Instance Method Summary collapse

Methods inherited from FunctionEvaluator

#initialize

Methods inherited from FunctionEvaluator

#debug, #error, #finer, #fn?, #info, #initialize, #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, tag_name) ⇒ Boolean

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

@param tag_name

Parameters:

  • task (Asana::Resources::Task)
  • tag_name (String)

Returns:

  • (Boolean)


141
142
143
144
145
146
# File 'lib/checkoff/internal/selector_classes/task.rb', line 141

def evaluate(task, tag_name)
  # @type [Array<Asana::Resources::Tag>]
  tags = task.tags.to_a
  tag_names = tags.map(&:name)
  tag_names.include?(tag_name)
end

#evaluate_arg?(_index) ⇒ Boolean

@param _index

Parameters:

  • _index (Integer)

Returns:

  • (Boolean)


134
135
136
# File 'lib/checkoff/internal/selector_classes/task.rb', line 134

def evaluate_arg?(_index)
  false
end

#matches? ⇒ Boolean

Returns:

  • (Boolean)


129
130
131
# File 'lib/checkoff/internal/selector_classes/task.rb', line 129

def matches?
  fn?(selector, :tag?)
end