Class: Checkoff::SelectorClasses::Common::CustomFieldGidValueContainsAnyGidPFunctionEvaluator

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

Overview

:custom_field_gid_value_contains_any_gid? function

Constant Summary collapse

FUNCTION_NAME =

Returns:

  • (Object)
:custom_field_gid_value_contains_any_gid?

Instance Attribute Summary

Attributes inherited from FunctionEvaluator

#selector

Instance Method Summary collapse

Methods inherited from FunctionEvaluator

#initialize

Methods inherited from FunctionEvaluator

#debug, #error, #finer, #fn?, #info, #log_level, #logger, #warn

Methods included from Logging

#debug, #error, #finer, #info, #log_level, #logger, #warn

Constructor Details

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

Instance Method Details

#evaluate(resource, custom_field_gid, custom_field_values_gids) ⇒ Boolean

sord warn - Asana::Resources::Task wasn't able to be resolved to a constant in this project sord warn - Asana::Resources::Project wasn't able to be resolved to a constant in this project @sg-ignore @sg-ignore

@param resource

@param custom_field_gid

@param custom_field_values_gids

Parameters:

  • resource (Asana::Resources::Task, Asana::Resources::Project)
  • custom_field_gid (String)
  • custom_field_values_gids (::Array[String])

Returns:

  • (Boolean)


160
161
162
163
164
165
166
167
168
169
# File 'lib/checkoff/internal/selector_classes/common.rb', line 160

def evaluate(resource, custom_field_gid, custom_field_values_gids)
  # @sg-ignore
  actual_custom_field_values_gids = @custom_fields.resource_custom_field_values_gids_or_raise(resource,
                                                                                              custom_field_gid)

  # @sg-ignore
  actual_custom_field_values_gids.any? do |custom_field_value|
    custom_field_values_gids.include?(custom_field_value)
  end
end

#evaluate_arg?(_index) ⇒ Boolean

Parameters:

  • _index (Integer)

Returns:

  • (Boolean)


150
151
152
# File 'lib/checkoff/internal/selector_classes/common.rb', line 150

def evaluate_arg?(_index)
  false
end

#matches?Boolean

Returns:

  • (Boolean)


146
147
148
# File 'lib/checkoff/internal/selector_classes/common.rb', line 146

def matches?
  fn?(selector, FUNCTION_NAME)
end