class Travis::CLI::Help
Public Instance Methods
commands()
click to toggle source
# File lib/travis/cli/help.rb, line 18 def commands CLI.commands.sort_by { |c| c.command_name } end
run(command = nil)
click to toggle source
# File lib/travis/cli/help.rb, line 8 def run(command = nil) if command say CLI.command(command).new.help else say "Usage: travis COMMAND ...\n\nAvailable commands:\n\n" commands.each { |c| say "\t#{color(c.command_name, :command).ljust(22)} #{color(c.description, :info)}" } say "\nrun `#$0 help COMMAND` for more infos" end end