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 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

@sg-ignore

Parameters:

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

Returns:

  • (Boolean)


118
119
120
# File 'lib/checkoff/internal/selector_classes/task.rb', line 118

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

#evaluate_arg?(_index) ⇒ Boolean

Parameters:

  • _index (Integer)

Returns:

  • (Boolean)


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

def evaluate_arg?(_index)
  false
end

#matches?Boolean

Returns:

  • (Boolean)


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

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