Class: ControlledTableRow

Inherits:
DocItem show all
Defined in:
lib/almirah/doc_items/controlled_table_row.rb

Instance Attribute Summary collapse

Attributes inherited from DocItem

#parent_doc, #parent_heading

Instance Method Summary collapse

Methods inherited from DocItem

#get_url

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

#initializeControlledTableRow

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

#columnsObject

Returns the value of attribute columns.



7
8
9
# File 'lib/almirah/doc_items/controlled_table_row.rb', line 7

def columns
  @columns
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/almirah/doc_items/controlled_table_row.rb', line 5

def id
  @id
end

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_htmlObject



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