Class: Checkoff::SelectorClasses::Task::InPortfolioMoreThanOncePFunctionEvaluator

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

Overview

:in_portfolio_more_than_once? function

Instance Attribute Summary

Attributes inherited from FunctionEvaluator

#custom_fields, #tasks, #timelines

Instance Method Summary collapse

Methods inherited from FunctionEvaluator

#initialize

Methods included from Logging

#debug, #error, #finer, #info, #logger, #warn

Constructor Details

This class inherits a constructor from Checkoff::SelectorClasses::Task::FunctionEvaluator

Instance Method Details

#evaluate(task, portfolio_name) ⇒ Boolean

Parameters:

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

Returns:

  • (Boolean)


116
117
118
# File 'lib/checkoff/internal/selector_classes/task.rb', line 116

def evaluate(task, portfolio_name)
  tasks.in_portfolio_more_than_once?(task, portfolio_name)
end

#evaluate_arg?(_index) ⇒ Boolean

Parameters:

  • _index (Integer)

Returns:

  • (Boolean)


109
110
111
# File 'lib/checkoff/internal/selector_classes/task.rb', line 109

def evaluate_arg?(_index)
  false
end

#matches?Boolean

Returns:

  • (Boolean)


104
105
106
# File 'lib/checkoff/internal/selector_classes/task.rb', line 104

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