Class: FluidCLI::Commands::Help
- Inherits:
-
FluidCLI::Command
- Object
- CLI::Kit::BaseCommand
- FluidCLI::Command
- FluidCLI::Commands::Help
- Defined in:
- lib/fluid_cli/commands/help.rb
Instance Attribute Summary
Attributes inherited from FluidCLI::Command
Instance Method Summary collapse
Methods inherited from FluidCLI::Command
call, call_help, #initialize, options, subcommand, subcommand_registry
Constructor Details
This class inherits a constructor from FluidCLI::Command
Instance Method Details
#call(args, _name) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fluid_cli/commands/help.rb', line 6 def call(args, _name) puts CLI::UI.fmt("{{bold:Available commands}}") puts "" FluidCLI::Commands::Registry.resolved_commands.each do |name, klass| next if name == 'help' puts CLI::UI.fmt("{{command:#{FluidCLI::TOOL_NAME} #{name}}}") if help = klass.help puts CLI::UI.fmt(help) end puts "" end end |