Class: ControlledTableRow
- Inherits:
-
DocItem
- Object
- TextLineBuilderContext
- TextLine
- DocItem
- ControlledTableRow
- Defined in:
- lib/almirah/doc_items/controlled_table_row.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#id ⇒ Object
Returns the value of attribute id.
-
#up_link_ids ⇒ Object
Returns the value of attribute up_link_ids.
Attributes inherited from DocItem
Instance Method Summary collapse
-
#initialize ⇒ ControlledTableRow
constructor
A new instance of ControlledTableRow.
- #to_html ⇒ Object
Methods inherited from DocItem
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 ⇒ ControlledTableRow
Returns a new instance of ControlledTableRow.
9 10 11 12 13 |
# File 'lib/almirah/doc_items/controlled_table_row.rb', line 9 def initialize @id = "" @up_link_ids = nil @columns = [] end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
7 8 9 |
# File 'lib/almirah/doc_items/controlled_table_row.rb', line 7 def columns @columns end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/almirah/doc_items/controlled_table_row.rb', line 5 def id @id end |
#up_link_ids ⇒ Object
Returns the value of attribute up_link_ids.
6 7 8 |
# File 'lib/almirah/doc_items/controlled_table_row.rb', line 6 def up_link_ids @up_link_ids end |
Instance Method Details
#to_html ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/almirah/doc_items/controlled_table_row.rb', line 15 def to_html s = "" s += "\t<tr>\n" @columns.each do |col| s += col.to_html # "\t\t<td>#{col}</td>\n\r" end s += "\t</tr>\n" end |