diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-10-27 10:51:51 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-10-27 10:51:51 -0700 |
commit | 5122f9f77f89ba026e77b36062b70b241c552792 (patch) | |
tree | 75a930f73e58e84a91707b10d86148af8b1a55a8 /lib/chef/cookbook_version.rb | |
parent | b3dbca14e1b587f4367acf082392fb3aea7bb872 (diff) | |
download | chef-5122f9f77f89ba026e77b36062b70b241c552792.tar.gz |
Merge repetitive conditionals
So much easier to read and probably faster this way too.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-rw-r--r-- | lib/chef/cookbook_version.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index 62407aa314..135a5292a6 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -264,7 +264,7 @@ class Chef if found_pref manifest_records_by_path[found_pref] else - if segment == :files || segment == :templates + if %i{files templates}.include?(segment) error_message = "Cookbook '#{name}' (#{version}) does not contain a file at any of these locations:\n" error_locations = if filename.is_a?(Array) filename.map { |name| " #{File.join(segment.to_s, name)}" } |