Class: Kdeploy::HelpFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/kdeploy/cli/help_formatter.rb

Overview

Formats help text for CLI

Instance Method Summary collapse

Constructor Details

#initializeHelpFormatter

Returns a new instance of HelpFormatter.



8
9
10
# File 'lib/kdeploy/cli/help_formatter.rb', line 8

def initialize
  @pastel = Pastel.new
end

Instance Method Details

#format_helpObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/kdeploy/cli/help_formatter.rb', line 12

def format_help
  <<~HELP
    #{@pastel.bright_white('📖 Available Commands:')}

    #{format_commands}

    #{format_examples}

    #{format_documentation}
  HELP
end