From ce9b1cae14dba410af27a98ba783155ea57aa526 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 16 Mar 2021 10:37:13 +0100 Subject: [PATCH] Use a shorter syntax to return --- lib/puppet/functions/extlib/has_module.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/puppet/functions/extlib/has_module.rb b/lib/puppet/functions/extlib/has_module.rb index f1aac86..f933da3 100644 --- a/lib/puppet/functions/extlib/has_module.rb +++ b/lib/puppet/functions/extlib/has_module.rb @@ -27,7 +27,6 @@ def has_module(module_name) # rubocop:disable Style/PredicateName return false unless File.exist?(metadata_json) metadata = JSON.parse(File.read(metadata_json)) - return true if metadata['name'] == full_module_name - false + metadata['name'] == full_module_name end end