47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/database_documenter/exporters/export_to_word.rb', line 47
def generate_table_metadata(docx, klass)
metadata = table_data.get_meta_data(klass)
docx.p ''
docx.h2 klass.table_name.to_s
docx.hr
word_table = [
["Table Name", metadata[:name]],
["Description", metadata[:description]],
["Primary Key", metadata[:primary_key]],
["SQL Code", metadata[:sql_code]]
]
docx.table word_table, border_size: 4 do
cell_style rows[0][0], background: 'b4b4b4', bold: true, width: 2000
cell_style rows[1][0], background: 'e0e0e0', bold: true, width: 2000
cell_style rows[2][0], background: 'e0e0e0', bold: true, width: 2000
cell_style rows[3][0], background: 'e0e0e0', bold: true, width: 2000
end
end
|