Class: TestStepResultColumn

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

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, #change_state, #format_string, #italic, #link

Constructor Details

This class inherits a constructor from ControlledTableColumn

Instance Method Details

#to_htmlObject



44
45
46
47
48
49
50
51
52
53
# File 'lib/almirah/doc_items/controlled_table.rb', line 44

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