Class: Mxup::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/mxup/cli.rb

Overview

Argv parser + dispatch. Keeps parsing rules in one place; the actual behaviour lives in Runner and the focused modules it drives.

Constant Summary collapse

COMMANDS =
%w[up status down restart layout target exec].freeze

Instance Method Summary collapse

Instance Method Details

#run(argv) ⇒ Object



11
12
13
14
15
# File 'lib/mxup/cli.rb', line 11

def run(argv)
  args, options = parse(argv.dup)
  command       = extract_command(args)
  dispatch(command, args, options)
end