Class: Commander::HelpFormatter::TerminalCompact

Inherits:
Terminal show all
Defined in:
lib/commander/help_formatters/terminal_compact.rb

Instance Method Summary collapse

Methods inherited from Terminal

#render, #render_command

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



8
9
10
11
12
13
14
# File 'lib/commander/help_formatters/terminal_compact.rb', line 8

def template(name)
  if RUBY_VERSION < '2.6'
    ERB.new(File.read(File.join(File.dirname(__FILE__), 'terminal_compact', "#{name}.erb")), nil, '-')
  else
    ERB.new(File.read(File.join(File.dirname(__FILE__), 'terminal_compact', "#{name}.erb")), trim_mode: '-')
  end
end