Class: Gargor::CLI

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

Instance Method Summary collapse

Instance Method Details

#tune(file = "gargor.rb") ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/gargor/cli.rb', line 25

def tune file="gargor.rb"
  require 'gargor/reporter'
  require 'progressbar'
  Gargor.start
  Gargor.load_dsl(file)
  Gargor.options = options

  pbar.set(0)
  trials
  best = best_individual
  deploy best 
  pbar.finish
  puts Gargor::OptimizeReporter.table(Gargor.base,best)
rescue ExterminationError =>e
  recover
  report_error_exit(e)
rescue =>e
  report_error_exit(e)
end