File: command_help.erb

package info (click to toggle)
ruby-commander 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 364 kB
  • sloc: ruby: 1,969; makefile: 9
file content (35 lines) | stat: -rw-r--r-- 810 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

  <%= HighLine.default_instance.color "NAME", :bold %>:

    <%= @name %>
<% if @syntax -%>

  <%= HighLine.default_instance.color "SYNOPSIS", :bold %>:

    <%= @syntax -%>

<% end -%>

  <%= HighLine.default_instance.color "DESCRIPTION", :bold %>:

    <%= Commander::HelpFormatter.indent 4, (@description || @summary || 'No description.') -%>

<% unless @examples.empty? -%>

  <%= HighLine.default_instance.color "EXAMPLES", :bold %>:
	<% for description, command in @examples -%>

    # <%= description %>
    <%= command %>
	<% end -%>
<% end -%>
<% unless @options.empty? -%>

  <%= HighLine.default_instance.color "OPTIONS", :bold %>:
	<% for option in @options -%>

    <%= option[:switches].join ', ' %>
        <%= Commander::HelpFormatter.indent 8, option[:description] %>
	<% end -%>
<% end -%>