Class: Checkoff::SelectorClasses::Common::AndFunctionEvaluator

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

Overview

:and function

Constant Summary collapse

FUNCTION_NAME =
:and

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::Common::FunctionEvaluator

Instance Method Details

#evaluate(_resource, *args) ⇒ Boolean

Parameters:

  • _resource (Asana::Resources::Task, Asana::Resources::Project)
  • args (Array<Object>)

Returns:

  • (Boolean)


20
21
22
# File 'lib/checkoff/internal/selector_classes/common.rb', line 20

def evaluate(_resource, *args)
  args.all? { |arg| arg }
end

#matches?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/checkoff/internal/selector_classes/common.rb', line 13

def matches?
  fn?(selector, FUNCTION_NAME)
end