Class: Podrpt::CLI

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

Class Method Summary collapse

Class Method Details

.start(args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/podrpt/cli.rb', line 4

def self.start(args)
  command = args.shift || 'run'
  case command
  when 'run'
    run_reporter(args)
  when 'init'
    initialize_configuration
  when '--version', '-v'
    puts Podrpt::VERSION
  else
    puts "Comando desconhecido: '#{command}'. Use 'run' ou 'init'."
    exit 1
  end
end