Class: GitSleep::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/git-sleep/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.startObject



5
6
7
8
9
10
# File 'lib/git-sleep/cli.rb', line 5

def self.start
  if command = ARGV.first
    command = command.to_sym
  end
  new.start(command)
end

Instance Method Details

#start(command) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/git-sleep/cli.rb', line 12

def start(command)
  case command
  when :init then init!
  when :authorize then authorize!
  when :'-v' then version!
  else
    send_help!
  end
end