Refactor CLI::InternalHelp.
This commit is contained in:
parent
cac0c29f73
commit
ed6823e659
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user