Method: Sunshine.run

Defined in:
lib/sunshine.rb

.run(argv = ARGV) ⇒ Object

Run Sunshine with the passed argv and exits with appropriate exitcode.

run %w{run my_script.rb -l debug}
run %w{list -d}
run %w{--rakefile}


340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/sunshine.rb', line 340

def self.run argv=ARGV
  command = find_command argv.first
  argv.shift if command

  command ||= DefaultCommand

  setup command.parse_args(argv)

  result = command.exec argv, config

  self.exit(*result)
end