contains.rb 513 B

123456789101112131415161718192021222324
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class CoreWorkflow::Condition::Contains < CoreWorkflow::Condition::Backend
  3. def match
  4. result = false
  5. value.each do |current_value|
  6. current_match = false
  7. condition_value.each do |current_condition_value|
  8. next if current_condition_value.exclude?(current_value)
  9. current_match = true
  10. break
  11. end
  12. next if !current_match
  13. result = true
  14. break
  15. end
  16. result
  17. end
  18. end