diff options
| author | Markus Reiter | 2017-05-29 17:50:13 +0200 |
|---|---|---|
| committer | Markus Reiter | 2017-05-29 17:50:13 +0200 |
| commit | d700a5ba188b0a01fba21401c4432239c29835bc (patch) | |
| tree | 9be4441f5331743b3979f0310f2a3dc05f0e0906 /Library/Homebrew/cmd | |
| parent | 481a91a92d869c7363edcc7c114b972680ba1aaa (diff) | |
| download | brew-d700a5ba188b0a01fba21401c4432239c29835bc.tar.bz2 | |
Use `Formatter::pluralize` where possible.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/uninstall.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index 9c51a0d1c..4839ba1e0 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -55,7 +55,7 @@ module Homebrew if rack.directory? versions = rack.subdirs.map(&:basename) - verb = versions.length == 1 ? "is" : "are" + verb = Formatter.pluralize(versions.length, "is", "are") puts "#{keg.name} #{versions.join(", ")} #{verb} still installed." puts "Remove all versions with `brew uninstall --force #{keg.name}`." end @@ -109,11 +109,11 @@ module Homebrew protected def are(items) - items.count == 1 ? "is" : "are" + Formatter.pluralize(items.count, "is", "are", show_count: false) end def they(items) - items.count == 1 ? "it" : "they" + Formatter.pluralize(items.count, "it", "they", show_count: false) end def list(items) |
