2019-04-19 15:38:03 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-09-06 08:29:14 +02:00
|
|
|
module Cask
|
2018-09-04 08:45:48 +01:00
|
|
|
class Cmd
|
2017-05-20 19:08:03 +02:00
|
|
|
class InternalHelp < AbstractInternalCommand
|
2020-08-01 02:30:46 +02:00
|
|
|
def self.max_named
|
|
|
|
0
|
|
|
|
end
|
2018-09-17 02:45:00 +02:00
|
|
|
|
2020-08-01 02:30:46 +02:00
|
|
|
def self.description
|
|
|
|
"Print help for unstable internal-use commands."
|
2017-05-21 00:15:56 +02:00
|
|
|
end
|
|
|
|
|
2017-05-20 03:07:37 +02:00
|
|
|
def run
|
2018-09-04 08:45:48 +01:00
|
|
|
max_command_len = Cmd.commands.map(&:length).max
|
2016-09-24 13:52:43 +02:00
|
|
|
puts "Unstable Internal-use Commands:\n\n"
|
2018-09-04 08:45:48 +01:00
|
|
|
Cmd.command_classes.each do |klass|
|
2020-04-07 08:32:30 +02:00
|
|
|
next if klass.visible?
|
2018-09-17 02:45:00 +02:00
|
|
|
|
2020-04-07 08:32:30 +02:00
|
|
|
puts " #{klass.command_name.ljust(max_command_len)} #{klass.help}"
|
2016-09-24 13:52:43 +02:00
|
|
|
end
|
|
|
|
puts "\n"
|
|
|
|
end
|
|
|
|
end
|
2016-08-18 22:11:42 +03:00
|
|
|
end
|
|
|
|
end
|