Class: Mu::Command::Help

Inherits:
Mu::Command show all
Defined in:
lib/mu/command/help.rb

Constant Summary

Constants inherited from Mu::Command

Api

Constants included from Helper

Helper::ESCAPES

Instance Attribute Summary

Attributes inherited from Mu::Command

#options, #opts

Instance Method Summary collapse

Methods inherited from Mu::Command

#initialize

Methods included from Helper

#ask, #bin2hex, #error, #escape, #format_float, #get_file_as_string_array, #make_xml, #msg, #shift, #to_boolean

Constructor Details

This class inherits a constructor from Mu::Command

Instance Method Details

#cmd_default(argv) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/mu/command/help.rb', line 4

def cmd_default argv
    puts
    puts "Usage: mu <command>:<option>"
    helps = [
        { :cmd => 'mu help', :help => "Display this help" },
        { :cmd => 'mu cmd_ddt:help', :help => 'Show help on using the Studio Verify Api through the command-line' },
        { :cmd => 'mu cmd_homepage:help', :help => 'Show help on using the Homepage Api through the command-line' },
        { :cmd => 'mu cmd_muapi:help', :help => 'Show help on using the Mu Api for fuzzing, templates, backup and archive' },
        { :cmd => 'mu cmd_musl:help', :help => 'Show help on using the Musl Api through the command-line' },
        { :cmd => 'mu cmd_netconfig:help', :help => 'Show help on using the Netconfig Api through the command-line'},
 { :cmd => 'mu cmd_runanalysis:help', :help => 'Show help on running a Studio Security test'},
        { :cmd => 'mu cmd_runscale:help', :help => 'Show help on running the Studio Scale app'},
        { :cmd => 'mu cmd_runscenario:help', :help => 'Show help on running the Scenario Editor Verify app' },
        { :cmd => 'mu cmd_runverify:help', :help => 'Show help on running the Studio Verify app' },
        { :cmd => 'mu cmd_scale:help', :help => 'Show help on using the Scale Api through the command-line' },
        { :cmd => 'mu cmd_system:help', :help => 'Show help on using the System Api through the command-line' },
    ]
    max_cmd_size = helps.inject(0) { |memo, obj| [ obj[:cmd].size, memo ].max } + 4
    helps.each do |h|
        puts "%*s - %s" % [max_cmd_size, h[:cmd], h[:help]]
    end
    puts
end