Skip to content

Commit

Permalink
COOK-3099: Prefer unless over 'if !'
Browse files Browse the repository at this point in the history
  • Loading branch information
btm committed May 31, 2013
1 parent f495876 commit 782a354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def policy_exists?(name)
action :set do
unless policy_exists?(new_resource.policy)
cmd = "rabbitmqctl set_policy"
cmd << " -p #{new_resource.vhost}" if !new_resource.vhost.nil?
cmd << " -p #{new_resource.vhost}" unless new_resource.vhost.nil?
cmd << " #{new_resource.policy}"
cmd << " \"#{new_resource.pattern}\""
cmd << " '{"
Expand Down

1 comment on commit 782a354

@stensonb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

derp....thanks! :)

Please sign in to comment.