Class: Hackle::BooleanMatcher

Inherits:
Object
  • Object
show all
Includes:
ValueMatcher
Defined in:
lib/hackle/internal/evaluation/match/value/value_matcher.rb

Instance Method Summary collapse

Instance Method Details

#matches(operator_matcher, value, match_value) ⇒ Object



65
66
67
68
69
70
71
# File 'lib/hackle/internal/evaluation/match/value/value_matcher.rb', line 65

def matches(operator_matcher, value, match_value)
  type_value = as_boolean(value)
  type_match_value = as_boolean(match_value)
  return false if type_value.nil? || type_match_value.nil?

  operator_matcher.boolean_matches(type_value, type_match_value)
end