Class: Wee::Brush::TableRowTag
Constant Summary
collapse
- HTML_TAG =
'tr'.freeze
GenericTagBrush::EVENTS
Instance Attribute Summary
Attributes inherited from Wee::Brush
#canvas, #document
Instance Method Summary
collapse
#callback_on, #get_oid, html_attr, #javascript_on, #oid, #onclick_callback, #onclick_javascript, #ondblclick_callback, #update_component_on, #update_on, #with
Methods inherited from Wee::Brush
#close, nesting?, #setup, #with
Constructor Details
Returns a new instance of TableRowTag.
257
258
259
|
# File 'lib/wee/html_brushes.rb', line 257
def initialize
super(HTML_TAG)
end
|
Instance Method Details
#columns(*cols, &block) ⇒ Object
261
262
263
264
265
266
267
268
269
270
271
272
273
|
# File 'lib/wee/html_brushes.rb', line 261
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
275
276
277
278
279
280
281
282
283
284
285
286
287
|
# File 'lib/wee/html_brushes.rb', line 275
def headings(*, &block)
with {
.each {||
@canvas..with {
if block
block.call()
else
@canvas.text()
end
}
}
}
end
|
293
294
295
|
# File 'lib/wee/html_brushes.rb', line 293
def spacer
with { @canvas.table_data { @canvas.space } }
end
|
#spanning_column(str, colspan) ⇒ Object
289
290
291
|
# File 'lib/wee/html_brushes.rb', line 289
def spanning_column(str, colspan)
with { @canvas.table_data.col_span(colspan).with(str) }
end
|