Class: Rutema::UI::VerticalTableFormatter
- Inherits:
-
Ruport::Formatter::HTML
- Object
- Ruport::Formatter::HTML
- Rutema::UI::VerticalTableFormatter
- Defined in:
- lib/rutema_web/activerecord/ruport_formatter.rb
Overview
Formats the test scenario data into a vertical folding structure
Instance Method Summary collapse
- #build_row(data = self.data) ⇒ Object
- #build_table_body ⇒ Object
- #build_table_footer ⇒ Object
- #build_table_header ⇒ Object
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_body ⇒ Object
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 |
#build_table_footer ⇒ Object
19 20 |
# File 'lib/rutema_web/activerecord/ruport_formatter.rb', line 19 def end |
#build_table_header ⇒ Object
16 17 |
# File 'lib/rutema_web/activerecord/ruport_formatter.rb', line 16 def build_table_header end |