Class: ControlledTableRow

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

Constant Summary

Constants included from HtmlSafe

HtmlSafe::ALLOWED_URL_SCHEMES

Instance Attribute Summary collapse

Attributes inherited from DocItem

#parent_doc, #parent_heading

Instance Method Summary collapse

Methods inherited from DocItem

#get_url, #owner_document, #split_table_cells

Methods inherited from TextLine

#bold, #bold_and_italic, broken_links, #format_string, #inline_code, #italic, #link, link_registry, link_registry=, #literal_text, #owner_document, record_broken_link, reset_broken_links, #wiki_link

Methods included from HtmlSafe

#escape_attr, #escape_text, #safe_url

Methods inherited from TextLineBuilderContext

#bold, #bold_and_italic, #inline_code, #italic, #link, #literal_text, #wiki_link

Constructor Details

#initializeControlledTableRow

Returns a new instance of ControlledTableRow.



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

def initialize
  @id = ''
  @up_link_ids = nil
  @columns = []
end

Instance Attribute Details

#columnsObject

Returns the value of attribute columns.



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

def columns
  @columns
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

Returns the value of attribute up_link_ids.



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

def up_link_ids
  @up_link_ids
end

Instance Method Details

#to_htmlObject



12
13
14
15
16
17
18
19
# File 'lib/almirah/doc_items/controlled_table_row.rb', line 12

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