Class: Checkoff::CustomFieldGidValueContainsAllGidsFunctionEvaluator

Inherits:
FunctionEvaluator
  • Object
show all
Defined in:
lib/checkoff/internal/task_selector_evaluator.rb

Overview

:custom_field_gid_value_contains_all_gids function

Instance Method Summary collapse

Methods inherited from FunctionEvaluator

#initialize

Constructor Details

This class inherits a constructor from Checkoff::FunctionEvaluator

Instance Method Details

#evaluate(task, custom_field_gid, custom_field_values_gids) ⇒ Object



207
208
209
210
211
212
213
# File 'lib/checkoff/internal/task_selector_evaluator.rb', line 207

def evaluate(task, custom_field_gid, custom_field_values_gids)
  actual_custom_field_values_gids = pull_custom_field_values_gids(task, custom_field_gid)

  custom_field_values_gids.all? do |custom_field_value|
    actual_custom_field_values_gids.include?(custom_field_value)
  end
end

#evaluate_arg?(_index) ⇒ Boolean

Returns:

  • (Boolean)


203
204
205
# File 'lib/checkoff/internal/task_selector_evaluator.rb', line 203

def evaluate_arg?(_index)
  false
end

#matches?Boolean

Returns:

  • (Boolean)


199
200
201
# File 'lib/checkoff/internal/task_selector_evaluator.rb', line 199

def matches?
  fn?(task_selector, :custom_field_gid_value_contains_all_gids)
end