Class: TestStepResultColumn

Inherits:
ControlledTableColumn show all
Defined in:
lib/almirah/doc_items/controlled_table.rb

Overview

rubocop:disable Style/Documentation

Instance Attribute Summary

Attributes inherited from ControlledTableColumn

#text

Instance Method Summary collapse

Methods inherited from ControlledTableColumn

#initialize

Methods inherited from TextLine

#bold, #bold_and_italic, broken_links, #format_string, #inline_code, #italic, #link, link_registry, link_registry=, #owner_document, record_broken_link, reset_broken_links, #wiki_link

Methods inherited from TextLineBuilderContext

#bold, #bold_and_italic, #inline_code, #italic, #link, #wiki_link

Constructor Details

This class inherits a constructor from ControlledTableColumn

Instance Method Details

#to_htmlObject



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/almirah/doc_items/controlled_table.rb', line 36

def to_html
  f_text = format_string(@text)
  case @text.downcase
  when 'pass'
    "\t\t<td style=\"background-color: #cfc;\">#{f_text}</td>\n\r"
  when 'fail'
    "\t\t<td style=\"background-color: #fcc;\">#{f_text}</td>\n\r"
  else
    "\t\t<td>#{f_text}</td>\n\r"
  end
end