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)


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

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

#evaluate_arg?(_index) ⇒ Boolean

Parameters:

  • _index (Integer)

Returns:

  • (Boolean)


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

def evaluate_arg?(_index)
  false
end

#matches?Boolean

Returns:

  • (Boolean)


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

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