Class: HTMLTableCell
- Inherits:
-
Object
- Object
- HTMLTableCell
- Defined in:
- lib/zarchitect/htmltable.rb
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(str, n, h) ⇒ HTMLTableCell
constructor
A new instance of HTMLTableCell.
- #process ⇒ Object
Constructor Details
#initialize(str, n, h) ⇒ HTMLTableCell
Returns a new instance of HTMLTableCell.
129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/zarchitect/htmltable.rb', line 129 def initialize(str,n,h) @content = str @colspan = n @headerf = h @html = String.new if @headerf @html << "<th colspan=\"#{@colspan}\">" else @html << "<td colspan=\"#{@colspan}\">" end end |
Instance Method Details
#html ⇒ Object
150 151 152 |
# File 'lib/zarchitect/htmltable.rb', line 150 def html @html end |
#process ⇒ Object
141 142 143 144 145 146 147 148 |
# File 'lib/zarchitect/htmltable.rb', line 141 def process @html << @content if @headerf @html << "</th>" else @html << "</td>" end end |