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

add_lazy_doc_id, #bold, #bold_and_italic, #format_string, #italic, #link

Methods inherited from TextLineBuilderContext

#bold, #bold_and_italic, #italic, #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