class MGit::HelpCommand
Public Instance Methods
arity()
click to toggle source
# File lib/mgit/commands/help.rb, line 17 def arity [0, 1] end
description()
click to toggle source
# File lib/mgit/commands/help.rb, line 25 def description 'display help information' end
execute(args)
click to toggle source
# File lib/mgit/commands/help.rb, line 3 def execute(args) if args.size == 0 pinfo 'M[eta]Git - manage multiple git repositories at the same time' pinfo '' pinfo 'Usage:' Command.instance_each do |cmd| pinfo "mgit #{cmd.usage}" pinfo "\t- #{cmd.description}" end else pinfo Command.create(args[0]).help end end
usage()
click to toggle source
# File lib/mgit/commands/help.rb, line 21 def usage 'help [command]' end