From a3d1de59a6ff0e46f64e40e0cc349531b35fb94f Mon Sep 17 00:00:00 2001 From: Fletcher Nichol Date: Thu, 23 Feb 2012 20:53:20 -0700 Subject: [PATCH] Remediate FC023: Prefer conditional attributes. * http://acrmp.github.com/foodcritic/#FC023 --- recipes/user.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/user.rb b/recipes/user.rb index 11a22026..3c4aff2e 100644 --- a/recipes/user.rb +++ b/recipes/user.rb @@ -30,11 +30,11 @@ end end - if rbenv_user['global'] - rbenv_global rbenv_user['global'] do - user rbenv_user['user'] - root_path rbenv_user['root_path'] if rbenv_user['root_path'] - end + rbenv_global rbenv_user['global'] do + user rbenv_user['user'] + root_path rbenv_user['root_path'] if rbenv_user['root_path'] + + only_if { rbenv_user['global'] } end gem_hash.each_pair do |rubie, gems|