Class: Aureus::Components::DataTableHead
Instance Method Summary
collapse
Methods inherited from Renderable
#compact, #compact_render, #content_tag, #init
Constructor Details
33
34
35
|
# File 'lib/aureus/components/data_table.rb', line 33
def initialize
@columns = Array.new
end
|
Instance Method Details
#render ⇒ Object
41
42
43
44
45
46
|
# File 'lib/aureus/components/data_table.rb', line 41
def render
text ''
content_tag 'thead' do
content_tag 'tr', compact_render(*@columns)
end
end
|
#text(name) ⇒ Object
37
38
39
|
# File 'lib/aureus/components/data_table.rb', line 37
def text(name)
@columns << DataTableHeadColumn.new(name)
end
|