diff options
| author | Alyssa Ross | 2016-11-14 13:39:17 +0000 |
|---|---|---|
| committer | Alyssa Ross | 2016-11-14 13:39:17 +0000 |
| commit | ca3562645c30b86da5057cf2f8de9974c4a18413 (patch) | |
| tree | 813598007deef61cad6821caa3856f1831d6f9a6 /Library/Homebrew/cmd | |
| parent | c77040b346fe95e09a18ba7268548d72be3cc6cb (diff) | |
| download | brew-ca3562645c30b86da5057cf2f8de9974c4a18413.tar.bz2 | |
uninstall: style fixes
Works around Rubycop not liking method names that start with `is_`
by changing convention from singular to plural.
I think it's better that way anyway.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/uninstall.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index c1923ebf4..34695bd1c 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -96,7 +96,7 @@ module Homebrew end class DependentsMessage - attr :reqs, :deps + attr_reader :reqs, :deps def initialize(requireds, dependents) @reqs = requireds @@ -105,11 +105,11 @@ module Homebrew protected - def is(items) + def are(items) items.count == 1 ? "is" : "are" end - def it(items) + def they(items) items.count == 1 ? "it" : "they" end @@ -121,15 +121,15 @@ module Homebrew "brew uninstall --ignore-dependencies #{list reqs.map(&:name)}" end - def is_required_by_deps - "#{is reqs} required by #{list deps}, which #{is deps} currently installed" + def are_required_by_deps + "#{are reqs} required by #{list deps}, which #{are deps} currently installed" end end class DeveloperDependentsMessage < DependentsMessage def output opoo <<-EOS.undent - #{list reqs} #{is_required_by_deps}. + #{list reqs} #{are_required_by_deps}. You can silence this warning with: #{sample_command} EOS @@ -140,7 +140,7 @@ module Homebrew def output ofail <<-EOS.undent Refusing to uninstall #{list reqs} - because #{it reqs} #{is_required_by_deps}. + because #{they reqs} #{are_required_by_deps}. You can override this and force removal with: #{sample_command} EOS |
