Class: Checkoff::SelectorClasses::Common::OrFunctionEvaluator
- Inherits:
-
FunctionEvaluator
- Object
- FunctionEvaluator
- FunctionEvaluator
- Checkoff::SelectorClasses::Common::OrFunctionEvaluator
- Defined in:
- lib/checkoff/internal/selector_classes/common.rb
Overview
:or function
Does not yet shortcut, but may in future - be careful with side effects!
Constant Summary collapse
- FUNCTION_NAME =
:or
Instance Method Summary collapse
Methods inherited from FunctionEvaluator
Methods inherited from FunctionEvaluator
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
39 40 41 |
# File 'lib/checkoff/internal/selector_classes/common.rb', line 39 def evaluate(_resource, *args) args.any? { |arg| arg } end |
#matches? ⇒ Boolean
32 33 34 |
# File 'lib/checkoff/internal/selector_classes/common.rb', line 32 def matches? fn?(selector, FUNCTION_NAME) end |