Class: Hackle::StringMatcher

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



17
18
19
20
21
22
23
# File 'lib/hackle/internal/evaluation/match/value/value_matcher.rb', line 17

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

  operator_matcher.string_matches(type_value, type_match_value)
end