Class: Kdeploy::HelpFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/kdeploy/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/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/help_formatter.rb', line 12

def format_help
  "    \#{@pastel.bright_white('\u{1F4D6} Available Commands:')}\n\n    \#{format_commands}\n\n    \#{format_examples}\n\n    \#{format_documentation}\n  HELP\nend\n"