Class: TestStepNumberColumn

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

Overview

rubocop:disable Style/Documentation

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

Methods inherited from TextLineBuilderContext

#bold, #bold_and_italic, #italic, #link

Constructor Details

#initialize(text) ⇒ TestStepNumberColumn

Returns a new instance of TestStepNumberColumn.



23
24
25
26
27
# File 'lib/almirah/doc_items/controlled_table.rb', line 23

def initialize(text)
  super
  @step_number = text.to_i
  @row_id = ''
end

Instance Attribute Details

#row_idObject

Returns the value of attribute row_id.



21
22
23
# File 'lib/almirah/doc_items/controlled_table.rb', line 21

def row_id
  @row_id
end

#step_numberObject

Returns the value of attribute step_number.



21
22
23
# File 'lib/almirah/doc_items/controlled_table.rb', line 21

def step_number
  @step_number
end

Instance Method Details

#to_htmlObject



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

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