Class: Commander::HelpFormatter::Terminal
- Inherits:
-
Base
show all
- Defined in:
- lib/commander/help_formatters/terminal.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
5
6
7
|
# File 'lib/commander/help_formatters/terminal.rb', line 5
def render
template(:help).result @runner.get_binding
end
|
#render_command(command) ⇒ Object
9
10
11
|
# File 'lib/commander/help_formatters/terminal.rb', line 9
def render_command command
template(:command_help).result command.get_binding
end
|
#template(name) ⇒ Object
13
14
15
|
# File 'lib/commander/help_formatters/terminal.rb', line 13
def template name
ERB.new(File.read(File.join(File.dirname(__FILE__), 'terminal', "#{name}.erb")), nil, '-')
end
|