Skip to content

Commit

Permalink
Convert if nested inside else to elsif
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Charreau committed Dec 20, 2023
1 parent 3bcf5bc commit 594ec3e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/puppet/type/elastic_stack_keystore.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@ def insync?(value)
else
if resource[:purge]
value == @should.first
elsif (@should.first.keys.sort - value.keys.sort).empty?
# compare the values of keys in common
(@should.first.values.sort - value.values.sort).empty?
else
if (@should.first.keys.sort - value.keys.sort).empty?
# compare the values of keys in common
(@should.first.values.sort - value.values.sort).empty?
else
false
end
false
end
end
end
Expand Down

0 comments on commit 594ec3e

Please sign in to comment.