Class: Checkoff::SelectorClasses::Common::NotFunctionEvaluator

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

Overview

:not function

Constant Summary collapse

FUNCTION_NAME =
:not

Instance Method Summary collapse

Methods inherited from FunctionEvaluator

#initialize

Methods inherited from FunctionEvaluator

#evaluate_arg?

Constructor Details

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

Instance Method Details

#evaluate(_resource, subvalue) ⇒ Boolean

Parameters:

  • _resource (Asana::Resources::Task, Asana::Resources::Project)
  • subvalue (Object)

Returns:

  • (Boolean)


55
56
57
# File 'lib/checkoff/internal/selector_classes/common.rb', line 55

def evaluate(_resource, subvalue)
  !subvalue
end

#matches?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/checkoff/internal/selector_classes/common.rb', line 48

def matches?
  fn?(selector, FUNCTION_NAME)
end