Method: OptParsePlus#help

Defined in:
lib/opt_parse_plus.rb

#helpObject



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/opt_parse_plus.rb', line 93

def help
  help_parts   = []
  help_parts << @parser.to_s

  if @commands.any?
    help_parts << ["Known Commands", ""]
    command_list = group_and_sort_command_help

    command_list.each do |cmd_line|
      help_parts << cmd_line
    end

    help_parts << ""
  end

  help_parts << ""
  help_parts.flatten.join("\n")
end