Class: HTMLTableRow
- Inherits:
-
Object
- Object
- HTMLTableRow
- Defined in:
- lib/zarchitect/htmltable.rb
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(ar, ar2) ⇒ HTMLTableRow
constructor
A new instance of HTMLTableRow.
- #process ⇒ Object
- #set_header ⇒ Object
Constructor Details
#initialize(ar, ar2) ⇒ HTMLTableRow
Returns a new instance of HTMLTableRow.
96 97 98 99 100 101 102 |
# File 'lib/zarchitect/htmltable.rb', line 96 def initialize(ar,ar2) @contents = ar @colspans = ar2 @headerf = false @columns = Array.new @html = "<tr>" end |
Instance Method Details
#html ⇒ Object
108 109 110 |
# File 'lib/zarchitect/htmltable.rb', line 108 def html @html end |
#process ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/zarchitect/htmltable.rb', line 112 def process @contents.each_with_index do |str,i| next if @colspans[i] == 0 @columns.push HTMLTableCell.new(str,@colspans[i], @headerf) end @columns.each do |c| c.process @html << c.html end @html << "</tr>" end |
#set_header ⇒ Object
104 105 106 |
# File 'lib/zarchitect/htmltable.rb', line 104 def set_header @headerf = true end |