Module: Commander::HelpFormatter

Defined in:
lib/commander/help_formatters/base.rb,
lib/commander/help_formatters.rb,
lib/commander/help_formatters/terminal.rb,
lib/commander/help_formatters/terminal_compact.rb

Overview

Help Formatter

Commander’s help formatters control the output when either the help command, or –help switch are called. The default formatter is Commander::HelpFormatter::Terminal.

Defined Under Namespace

Classes: Base, Context, ProgramContext, Terminal, TerminalCompact

Class Method Summary collapse

Class Method Details

.indent(amount, text) ⇒ Object



47
48
49
# File 'lib/commander/help_formatters.rb', line 47

def indent(amount, text)
  text.to_s.gsub("\n", "\n#{' ' * amount}")
end