Class: Checkoff::SelectorClasses::Common::NilPFunctionEvaluator

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

Overview

:nil? function

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, subvalue) ⇒ Boolean

Parameters:

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

Returns:

  • (Boolean)


68
69
70
# File 'lib/checkoff/internal/selector_classes/common.rb', line 68

def evaluate(_resource, subvalue)
  subvalue.nil?
end

#matches?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/checkoff/internal/selector_classes/common.rb', line 61

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