Class: Rutema::UI::VerticalTableFormatter

Inherits:
Ruport::Formatter::HTML
  • Object
show all
Defined in:
lib/rutema_web/activerecord/ruport_formatter.rb

Overview

Formats the test scenario data into a vertical folding structure

Instance Method Summary collapse

Instance Method Details

#build_row(data = self.data) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/rutema_web/activerecord/ruport_formatter.rb', line 22

def build_row(data = self.data)
  output << "<table class=\"vtable\"><colgroup><col width=\"100\"><col></colgroup>\n"
  output << "<tr><td>#{data['status']}</td><td colspan=\"2\"><h3>#{data['number']} - #{data['name']}</h3></td></tr>"
  output << "<tr><td>duration:</td><td>#{data['duration']}</td></tr>\n"
  %w(output error).each { |k| output << "<tr><td colspan=\"2\"><div class=\"scenario_#{k}\"><pre>#{data.get(k)}</pre></div></td></tr>\n" if data.get(k).size > 0 }
  output << "</table>\n"
end

#build_table_bodyObject



10
11
12
13
14
# File 'lib/rutema_web/activerecord/ruport_formatter.rb', line 10

def build_table_body
  data.each do |row|
    build_row(row)
  end
end


19
20
# File 'lib/rutema_web/activerecord/ruport_formatter.rb', line 19

def build_table_footer
end

#build_table_headerObject



16
17
# File 'lib/rutema_web/activerecord/ruport_formatter.rb', line 16

def build_table_header
end