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
7
8
9
|
# File 'lib/commander/help_formatters/terminal.rb', line 7
def render
template(:help).result @runner.get_binding
end
|
#render_command(command) ⇒ Object
11
12
13
|
# File 'lib/commander/help_formatters/terminal.rb', line 11
def render_command command
template(:command_help).result command.get_binding
end
|
#template(name) ⇒ Object
15
16
17
|
# File 'lib/commander/help_formatters/terminal.rb', line 15
def template name
ERB.new(File.read(File.join(File.dirname(__FILE__), 'terminal', "#{name}.erb")), nil, '-')
end
|