Class: TestStepNumberColumn

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

Instance Attribute Summary collapse

Attributes inherited from ControlledTableColumn

#text

Instance Method Summary collapse

Methods inherited from TextLine

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

Constructor Details

#initialize(text) ⇒ TestStepNumberColumn



29
30
31
32
33
34
# File 'lib/almirah/doc_items/controlled_table.rb', line 29

def initialize(text)
    text = text.strip
    @step_number = text.to_i
    @text =  text
    @row_id = ""
end

Instance Attribute Details

#row_idObject

Returns the value of attribute row_id.



27
28
29
# File 'lib/almirah/doc_items/controlled_table.rb', line 27

def row_id
  @row_id
end

#step_numberObject

Returns the value of attribute step_number.



26
27
28
# File 'lib/almirah/doc_items/controlled_table.rb', line 26

def step_number
  @step_number
end

Instance Method Details

#to_htmlObject



36
37
38
# File 'lib/almirah/doc_items/controlled_table.rb', line 36

def to_html
    "\t\t<td style=\"text-align: center;\"><a name=\"#{@row_id}\" id=\"#{@row_id}\" href=\"##{@row_id}\">#{@text}</a></td>\n\r"
end