Class: MGit::CLI

Inherits:
Object
  • Object
show all
Includes:
Output
Defined in:
lib/mgit/cli.rb

Instance Method Summary collapse

Methods included from Output

#perror, #pinfo, #ptable, #pwarn

Instance Method Details

#startObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/mgit/cli.rb', line 5

def start
  raise NoCommandError if ARGV.size == 0

  # Initialize AppData and migrate if necessary.
  AppData.update

  # Initialize Commands.
  Command.load_commands

  # Run command, consuming its name from the list of arguments.
  command = Command.execute(ARGV.shift, ARGV)
rescue UsageError => e
  perror e.to_s
rescue GitError => e
  perror e.to_s
end