Skip to content

Commit

Permalink
Merge nested conditions into outer unless conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Apr 30, 2023
1 parent 59b6b36 commit 3ff39ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/t/delete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ def list(list)
list = list.to_i
end
list = client.list(list)
unless options['force']
return unless yes? "Are you sure you want to permanently delete the list \"#{list.name}\"? [y/N]"
end
return if !options['force'] && !(yes? "Are you sure you want to permanently delete the list \"#{list.name}\"? [y/N]")
client.destroy_list(list)
say "@#{@rcfile.active_profile[0]} deleted the list \"#{list.name}\"."
end
Expand Down

0 comments on commit 3ff39ae

Please sign in to comment.