diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-11-15 15:03:32 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-06 13:08:26 -0800 |
commit | db85ca494a484024404f1090c493613cc9521662 (patch) | |
tree | cc655fce7e3bfaa450a697889f2e8f2e5c80d38d /chef-config | |
parent | d218f942628da9a7302f1cc166abec0ea4fdeba2 (diff) | |
download | chef-db85ca494a484024404f1090c493613cc9521662.tar.gz |
fix Style/MultilineIfModifier
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'chef-config')
-rw-r--r-- | chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb b/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb index 6dd678840a..1c0184a4ce 100644 --- a/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb +++ b/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb @@ -21,9 +21,11 @@ module ChefConfig module FuzzyHostnameMatcher def fuzzy_hostname_match_any?(hostname, matches) - return matches.to_s.split(/\s*,\s*/).compact.any? do |m| - fuzzy_hostname_match?(hostname, m) - end if (hostname != nil) && (matches != nil) + if (hostname != nil) && (matches != nil) + return matches.to_s.split(/\s*,\s*/).compact.any? do |m| + fuzzy_hostname_match?(hostname, m) + end + end false end |