Class: Hackle::VersionMatcher

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



88
89
90
91
92
93
94
# File 'lib/hackle/internal/evaluation/match/value/value_matcher.rb', line 88

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

  operator_matcher.version_matches(type_value, type_match_value)
end