Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubocop: Fix Style/GuardClause #154

Merged
merged 1 commit into from Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions lib/puppet/provider/rvm_gem/gem.rb
Expand Up @@ -47,11 +47,8 @@ def gemlist(hash)
rescue Puppet::ExecutionFailure => detail
end

if hash[:justme]
return list.shift
else
return list
end
return list.shift if hash[:justme]
list
end

def self.gemsplit(desc)
Expand Down
6 changes: 1 addition & 5 deletions lib/puppet/type/rvm_gem.rb
Expand Up @@ -87,11 +87,7 @@ def insync?(is)

case is
when Array
if is.include?(@latest)
return true
else
return false
end
return is.include?(@latest)
when @latest
return true
else
Expand Down