Skip to content

Commit 93d73b0

Browse files
author
Bilal Al
committed
polish
1 parent 6b83afc commit 93d73b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/splitclient-rb/engine/matchers/equal_to_semver_matcher.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ def match?(args)
1919
return false unless @validator.valid_matcher_arguments(args)
2020

2121
value_to_match = args[:attributes][@attribute.to_sym]
22-
if !value_to_match.is_a?(String)
22+
unless value_to_match.is_a?(String)
2323
@logger.error('stringMatcherData is required for EQUAL_TO_SEMVER matcher type')
2424
return false
2525
end
26-
matches = (@semver.compare(SplitIoClient::Semver.new(value_to_match)) == 0)
26+
matches = @semver.compare(SplitIoClient::Semver.new(value_to_match)).zero?
2727
@logger.log_if_debug("[EqualsToSemverMatcher] #{value_to_match} matches -> #{matches}")
2828
matches
2929
end

0 commit comments

Comments
 (0)