Class: Karafka::Web::Cli::Help
- Defined in:
- lib/karafka/web/cli/help.rb
Overview
Displays help
Instance Method Summary collapse
-
#call ⇒ Object
Print available commands.
Methods inherited from Base
Instance Method Details
#call ⇒ Object
Print available commands
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/karafka/web/cli/help.rb', line 11 def call # Find the longest command for alignment purposes max_command_length = self.class.commands.map(&:name).map(&:size).max puts 'Karafka Web UI commands:' # Print each command formatted with its description self.class.commands.each do |command| puts " #{command.name.ljust(max_command_length)} # #{command.desc}" end end |