class SimpleCommander::HelpFormatter::Terminal
Public Instance Methods
render()
click to toggle source
# File lib/simple_commander/help_formatters/terminal.rb, line 6 def render template(:help).result(ProgramContext.new(@runner).get_binding) end
render_command(command)
click to toggle source
# File lib/simple_commander/help_formatters/terminal.rb, line 10 def render_command(command) template(:command_help).result(Context.new(command).get_binding) end
template(name)
click to toggle source
# File lib/simple_commander/help_formatters/terminal.rb, line 14 def template(name) ERB.new(File.read(File.join(File.dirname(__FILE__), 'terminal', "#{name}.erb")), nil, '-') end