Module: Mry::CLI

Defined in:
lib/mry/cli.rb

Class Method Summary collapse

Class Method Details

.run(argv) ⇒ Integer

Returns exit code.

Parameters:

  • argv (Array<String>)

Returns:

  • (Integer)

    exit code



6
7
8
9
10
11
12
13
14
# File 'lib/mry/cli.rb', line 6

def run(argv)
  parse_option(argv)
  if argv.empty?
    puts option.help
    return 1
  end
  Runner.run(argv, to: @target, from: @from)
  return 0
end