Class: Gargor::OptimizeReporter

Inherits:
Reporter
  • Object
show all
Defined in:
lib/gargor/reporter.rb

Class Method Summary collapse

Class Method Details

.table(from, to) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/gargor/reporter.rb', line 6

def table from,to
  table = Terminal::Table.new :headings => ['param', 'from', 'to'] do |t|
    from.params.each do |name,f|
      t << [name,f,to.params[name]]
    end
    t << :separator
    t << ['Fitness', from.fitness,to.fitness]
  end
  [1,2].map { |n| table.align_column(n, :right) }
  table.style={:border_y => "", :border_i => "-"}
  table 
end