Module: MCLI

Defined in:
lib/mcli.rb,
lib/mcli/version.rb

Defined Under Namespace

Classes: Command, CommandGroup, HelpError, NullCommand

Constant Summary collapse

VERSION =
"0.5.0"

Class Method Summary collapse

Class Method Details

.runObject



11
12
13
14
15
16
17
18
# File 'lib/mcli.rb', line 11

def run
  command = ARGV.shift

  CommandGroup.commands.fetch(command.to_s.to_sym) do |command|
    ARGV.unshift(command)
    CommandGroup.root_command || NullCommand
  end.call
end