Class: Checkoff::SelectorClasses::Task::InPortfolioNamedPFunctionEvaluator

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

Overview

:in_portfolio_named? function

Constant Summary collapse

FUNCTION_NAME =
:in_portfolio_named?

Instance Attribute Summary

Attributes inherited from FunctionEvaluator

#custom_fields, #tasks, #timelines

Instance Method Summary collapse

Methods inherited from FunctionEvaluator

#initialize

Methods inherited from FunctionEvaluator

#evaluate_arg?

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)


321
322
323
# File 'lib/checkoff/internal/selector_classes/task.rb', line 321

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

#matches?Boolean

Returns:

  • (Boolean)


313
314
315
# File 'lib/checkoff/internal/selector_classes/task.rb', line 313

def matches?
  fn?(selector, FUNCTION_NAME)
end