Class: MethodRay::CLI

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

Class Method Summary collapse

Class Method Details

.start(args) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/methodray/cli.rb', line 7

def self.start(args)
  command = args.shift

  case command
  when 'help', '--help', '-h', nil
    Commands.help
  when 'version', '--version', '-v'
    Commands.version
  when 'check'
    Commands.check(args)
  when 'watch'
    Commands.watch(args)
  when 'clear-cache'
    Commands.clear_cache(args)
  else
    puts "Unknown command: #{command}"
    Commands.help
    exit 1
  end
end