diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-11-06 11:26:34 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-11-06 11:28:03 -0800 |
commit | c6fad3888a03eeab41b63df0c9cbdea5a48f7e97 (patch) | |
tree | f08ca91f94580e465b1a468ffbf4ae0419a2a62a /lib/chef/resource | |
parent | a71a65a25b51b52fbb4e2ab4607e584d52cc3b61 (diff) | |
download | chef-c6fad3888a03eeab41b63df0c9cbdea5a48f7e97.tar.gz |
Collapse several duplicate branches down
Write more compact case statements to prevent duplicate branches.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/plist.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/chef/resource/plist.rb b/lib/chef/resource/plist.rb index f4058520a9..a7cb88ef57 100644 --- a/lib/chef/resource/plist.rb +++ b/lib/chef/resource/plist.rb @@ -151,9 +151,7 @@ class Chef value.to_i when "float" value.to_f - when "string" - value - when "dictionary" + when "string", "dictionary" value when nil "" @@ -168,9 +166,7 @@ class Chef "array" when Integer "integer" - when FalseClass - "bool" - when TrueClass + when FalseClass, TrueClass "bool" when Hash "dict" |