Class: TestStepReferenceColumn
- Inherits:
-
ControlledTableColumn
- Object
- TextLine
- ControlledTableColumn
- TestStepReferenceColumn
- Defined in:
- lib/almirah/doc_items/controlled_table.rb
Instance Attribute Summary collapse
-
#up_link ⇒ Object
Returns the value of attribute up_link.
-
#up_link_doc_id ⇒ Object
Returns the value of attribute up_link_doc_id.
Attributes inherited from ControlledTableColumn
Instance Method Summary collapse
-
#initialize(text) ⇒ TestStepReferenceColumn
constructor
A new instance of TestStepReferenceColumn.
- #to_html ⇒ Object
Methods inherited from TextLine
add_lazy_doc_id, #bold, #bold_and_italic, #change_state, #format_string, #italic, #link
Constructor Details
#initialize(text) ⇒ TestStepReferenceColumn
Returns a new instance of TestStepReferenceColumn.
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/almirah/doc_items/controlled_table.rb', line 62 def initialize(text) @up_link = nil @up_link_doc_id = nil if tmp = />\[(\S*)\]/.match(text) # >[SRS-001] @up_link = tmp[1] if tmp = /^([a-zA-Z]+)[-]\d+/.match(@up_link) # SRS @up_link_doc_id = tmp[1].downcase end end end |
Instance Attribute Details
#up_link ⇒ Object
Returns the value of attribute up_link.
59 60 61 |
# File 'lib/almirah/doc_items/controlled_table.rb', line 59 def up_link @up_link end |
#up_link_doc_id ⇒ Object
Returns the value of attribute up_link_doc_id.
60 61 62 |
# File 'lib/almirah/doc_items/controlled_table.rb', line 60 def up_link_doc_id @up_link_doc_id end |
Instance Method Details
#to_html ⇒ Object
75 76 77 78 79 80 81 |
# File 'lib/almirah/doc_items/controlled_table.rb', line 75 def to_html if @up_link "\t\t<td class=\"item_id\"><a href=\"./../../../specifications/#{@up_link_doc_id}/#{@up_link_doc_id}.html##{@up_link}\" class=\"external\">#{@up_link}</a></td>\n\r" else "\t\t<td style=\"text-align: center;\"></td>\n\r" end end |