Class: Kiba::Cli

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

Class Method Summary collapse

Class Method Details

.run(args) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/kiba/cli.rb', line 5

def self.run(args)
  unless args.size == 1
    puts 'Syntax: kiba your-script.etl'
    exit(-1)
  end
  filename = args[0]
  script_content = IO.read(filename)
  job_definition = Kiba.parse(script_content, filename)
  Kiba.run(job_definition)
end