From 6ab00a2f4434d462a54e8169103e898646930e65 Mon Sep 17 00:00:00 2001 From: Carlos Goce Date: Fri, 23 Jan 2015 21:27:49 +0100 Subject: Add styles to table --- lib/carlosgoce/layout/layouts.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/carlosgoce/layout') diff --git a/lib/carlosgoce/layout/layouts.rb b/lib/carlosgoce/layout/layouts.rb index e9c1ce8..f9594ca 100644 --- a/lib/carlosgoce/layout/layouts.rb +++ b/lib/carlosgoce/layout/layouts.rb @@ -9,13 +9,14 @@ module CarlosGoce tables = [] Prawn::Document.generate(file) do + font_size = 16 + data.each do |k, month| days = data[k][:days] - - # text data[k][:name] cells = (days).to_a.each_slice(7).to_a + cells.unshift [data[k][:name]] - tables << make_table(cells, :cell_style => {:align => :center}) + tables << make_table(cells, cell_style: {align: :center, size: 7, border_width: 0}) end table( -- cgit v1.2.3