Class: Wee::Brush::TableRowTag
Constant Summary
collapse
- HTML_TAG =
'tr'.freeze
Instance Attribute Summary
Attributes inherited from Wee::Brush
#canvas, #document
Instance Method Summary
collapse
#get_oid, html_attr, #oid, #onclick_callback, #onclick_javascript, #onclick_update_callback, #onclick_update_self_callback, #ondblclick_callback, #with
Methods inherited from Wee::Brush
#close, nesting?, #setup, #with
Constructor Details
Returns a new instance of TableRowTag.
210
211
212
|
# File 'lib/wee/html_brushes.rb', line 210
def initialize
super(HTML_TAG)
end
|
Instance Method Details
#columns(*cols, &block) ⇒ Object
214
215
216
217
218
219
220
221
222
223
224
225
226
|
# File 'lib/wee/html_brushes.rb', line 214
def columns(*cols, &block)
with {
cols.each {|col|
@canvas.table_data.with {
if block
block.call(col)
else
@canvas.text(col)
end
}
}
}
end
|
#headings(*headers, &block) ⇒ Object
228
229
230
231
232
233
234
235
236
237
238
239
240
|
# File 'lib/wee/html_brushes.rb', line 228
def headings(*, &block)
with {
.each {||
@canvas..with {
if block
block.call()
else
@canvas.text()
end
}
}
}
end
|
246
247
248
|
# File 'lib/wee/html_brushes.rb', line 246
def spacer
with { @canvas.table_data { @canvas.space } }
end
|
#spanning_column(str, colspan) ⇒ Object
242
243
244
|
# File 'lib/wee/html_brushes.rb', line 242
def spanning_column(str, colspan)
with { @canvas.table_data.col_span(colspan).with(str) }
end
|