aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
authorMarkus Reiter2017-05-20 03:07:37 +0200
committerMarkus Reiter2017-05-22 02:51:16 +0200
commited6823e659b54b8089a8b3aaf381025e0ed44761 (patch)
treed1a0089d8e4f7d24d1f774af1214a9645fa770ca /Library/Homebrew/cask/lib
parentcac0c29f732f2de3362b353b8f86e345469397ff (diff)
downloadbrew-ed6823e659b54b8089a8b3aaf381025e0ed44761.tar.bz2
Refactor `CLI::InternalHelp`.
Diffstat (limited to 'Library/Homebrew/cask/lib')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_help.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_help.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_help.rb
index 0908ee05e..3903f3b08 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_help.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_help.rb
@@ -1,12 +1,16 @@
module Hbc
class CLI
class InternalHelp < InternalUseBase
- def self.run(*_ignored)
+ def self.run(*args)
+ new(*args).run
+ end
+
+ def run
max_command_len = CLI.commands.map(&:length).max
puts "Unstable Internal-use Commands:\n\n"
CLI.command_classes.each do |klass|
next if klass.visible
- puts " #{klass.command_name.ljust(max_command_len)} #{help_for(klass)}"
+ puts " #{klass.command_name.ljust(max_command_len)} #{self.class.help_for(klass)}"
end
puts "\n"
end