Table = ->(cols, rows) {
table {
thead {
tr { cols.each { th it } }
}
tbody {
rows.each { |row|
tr { row.each { td it } }
}
}
}
}
-> {
div {
Table(
['Title', 'Location'],
[ ['RailsWorld', 'Amsterdam'],
['Friendly.rb', 'Bucharest'],
['Euruko', 'Viana do Castelo'] ]
)
}
}