We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b83afc commit 93d73b0Copy full SHA for 93d73b0
lib/splitclient-rb/engine/matchers/equal_to_semver_matcher.rb
@@ -19,11 +19,11 @@ def match?(args)
19
return false unless @validator.valid_matcher_arguments(args)
20
21
value_to_match = args[:attributes][@attribute.to_sym]
22
- if !value_to_match.is_a?(String)
+ unless value_to_match.is_a?(String)
23
@logger.error('stringMatcherData is required for EQUAL_TO_SEMVER matcher type')
24
return false
25
end
26
- matches = (@semver.compare(SplitIoClient::Semver.new(value_to_match)) == 0)
+ matches = @semver.compare(SplitIoClient::Semver.new(value_to_match)).zero?
27
@logger.log_if_debug("[EqualsToSemverMatcher] #{value_to_match} matches -> #{matches}")
28
matches
29
0 commit comments