Class: Commander::HelpFormatter::TerminalCompact
- Defined in:
- lib/commander/help_formatters/terminal_compact.rb
Overview
A condensed variant of HelpFormatter::Terminal, using the ERB
templates in the neighboring terminal_compact/ directory. Enable
it with program :help_formatter, :compact.
Instance Method Summary collapse
-
#template(name) ⇒ Object
Compile the ERB template named name (+:help+ or
:command_help) from this formatter's template directory.
Methods inherited from Terminal
Methods inherited from Base
#initialize, #render, #render_command
Constructor Details
This class inherits a constructor from Commander::HelpFormatter::Base
Instance Method Details
#template(name) ⇒ Object
Compile the ERB template named name (+:help+ or
:command_help) from this formatter's template directory.
15 16 17 |
# File 'lib/commander/help_formatters/terminal_compact.rb', line 15 def template(name) ERB.new(File.read(File.join(File.dirname(__FILE__), 'terminal_compact', "#{name}.erb")), trim_mode: '-') end |