Module: WTBuildHelpers::Help

Defined in:
lib/help.rb

Class Method Summary collapse

Class Method Details



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/help.rb', line 12

def self.print_command_help(args, commands)
    command_name = args[0]
    command = commands.find do |c|
        c.command == command_name
    end

    if command 
        command.help_function.call()
    else
        puts "Unknown command: #{command_name}"
        exit 1
    end
end


8
9
10
# File 'lib/help.rb', line 8

def self.print_help()
    puts "Usage: wtbuild help command"
end