homebrew-cask-versions/lib/hbc/cli/internal_help.rb
Roland Walker 202d6019f8 Move all code under an Hbc:: namespace
* convert existing Cask:: namespace to Hbc::
* move Homebrew-fork code under Hbc::
* move freestanding classes such as Tty and TopologicalHash under Hbc::
* recast HOMEBREW_CASK_ constants as HBC_
* modify our Homebrew Formula for backward compatibility
* devscripts and dev docs
2015-01-02 07:27:03 -05:00

19 lines
540 B
Ruby

class Hbc::CLI::InternalHelp < Hbc::CLI::InternalUseBase
def self.run(*_ignored)
max_command_len = Hbc::CLI.commands.map(&:length).max
puts "Unstable Internal-use Commands:\n\n"
Hbc::CLI.command_classes.each do |klass|
next if klass.visible
puts " #{klass.command_name.ljust(max_command_len)} #{help_for(klass)}"
end
puts "\n"
end
def self.help_for(klass)
klass.respond_to?(:help) ? klass.help : nil
end
def self.help
"Print help strings for unstable internal-use commands"
end
end