Sha256: 03a53689f9df9f0061e4f1f633b5530c36e03d202511809d37f1c30914a6639c
Contents?: true
Size: 647 Bytes
Versions: 21
Compression:
Stored size: 647 Bytes
Contents
# frozen_string_literal: true module Karafka module Web class Cli # Displays help class Help < Base desc 'Describes available commands' # Print available commands 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 end end end end
Version data entries
21 entries across 21 versions & 1 rubygems