Class: Waff::Commander

Inherits:
Object
  • Object
show all
Defined in:
lib/waff/commander.rb

Class Method Summary collapse

Class Method Details

.call(params) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/waff/commander.rb', line 4

def call params
  LocalRepository.check_existence!
  Config.init_config!

  command = params.shift

  case command
  when 'take'
    Commands::Take.call(params)
  when 'pause'
    Commands::Pause.call(params)
  when 'list'
    Commands::List.call(params)
  when 'show'
    Commands::Show.call(params)
  when 'open'
    Commands::Open.call(params)
  else
    puts HELP_TEXT
  end
end