Sha256: 980ea1b2f405d556747301f086dd6df7b769b10e143b3bb2c443e75452602df7
Contents?: true
Size: 482 Bytes
Versions: 3
Compression:
Stored size: 482 Bytes
Contents
require 'gen' module Gen module Commands class Help < Gen::Command def call(_args, _name) puts CLI::UI.fmt("{{bold:Available commands}}") puts "" Gen::Commands::Registry.resolved_commands.each do |name, klass| puts CLI::UI.fmt("{{command:#{Gen::TOOL_NAME} #{name}}}") if klass.respond_to?(:help) && help = klass.help puts CLI::UI.fmt(help) end puts "" end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cli-kit-3.3.0 | gen/lib/gen/commands/help.rb |
cli-kit-3.1.0 | gen/lib/gen/commands/help.rb |
cli-kit-3.0.1 | gen/lib/gen/commands/help.rb |