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


45
46
47
# File 'lib/commander/help_formatters.rb', line 45

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