summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-11-08 10:41:57 -0800
committerTim Smith <tsmith84@gmail.com>2020-11-08 10:41:57 -0800
commitc410c7e3aca6073eeef050abd503064141da9d78 (patch)
tree133e5379a9213424b58c0989b5e6bb5756686b6e /lib
parentd6ffd5b44a04ff32e9049ed8c04bf4dad38e5b7e (diff)
downloadchef-or_equal.tar.gz
Use ||= where we canor_equal
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/cookbook_version.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index 135a5292a6..5719fa6a13 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -587,9 +587,7 @@ class Chef
end
def file_vendor
- unless @file_vendor
- @file_vendor = Chef::Cookbook::FileVendor.create_from_manifest(cookbook_manifest)
- end
+ @file_vendor ||= Chef::Cookbook::FileVendor.create_from_manifest(cookbook_manifest)
@file_vendor
end