Class: Checkoff::SelectorClasses::Common::CustomFieldValueFunctionEvaluator
- Inherits:
-
FunctionEvaluator
- Object
- FunctionEvaluator
- FunctionEvaluator
- Checkoff::SelectorClasses::Common::CustomFieldValueFunctionEvaluator
- Defined in:
- lib/checkoff/internal/selector_classes/common.rb
Overview
:custom_field_value function
Constant Summary collapse
- FUNCTION_NAME =
:custom_field_value
Instance Method Summary collapse
- #evaluate(resource, custom_field_name) ⇒ String?
- #evaluate_arg?(_index) ⇒ Boolean
- #matches? ⇒ Boolean
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, custom_field_name) ⇒ String?
107 108 109 110 111 112 |
# File 'lib/checkoff/internal/selector_classes/common.rb', line 107 def evaluate(resource, custom_field_name) custom_field = @custom_fields.resource_custom_field_by_name(resource, custom_field_name) return nil if custom_field.nil? custom_field['display_value'] end |
#evaluate_arg?(_index) ⇒ Boolean
100 101 102 |
# File 'lib/checkoff/internal/selector_classes/common.rb', line 100 def evaluate_arg?(_index) false end |
#matches? ⇒ Boolean
95 96 97 |
# File 'lib/checkoff/internal/selector_classes/common.rb', line 95 def matches? fn?(selector, FUNCTION_NAME) end |