Method: Codeguard::CLI.run

Defined in:
lib/codeguard/cli.rb

.run(*args) ⇒ Object



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

def run(*args)
  command = args.shift
  unless AVAILABLE_OPTIONS.include?(command)
    puts "Invalid option: #{command}\n\n" if command
    command = :help
  end

  Codeguard.send(command || :help, *args)
end