aboutsummaryrefslogtreecommitdiffstats
path: root/lib/carlosgoce/layout
diff options
context:
space:
mode:
authorCarlos Goce <carlosgoce@gmail.com>2015-01-24 22:48:40 +0100
committerCarlos Goce <carlosgoce@gmail.com>2015-01-24 22:48:40 +0100
commitf5dcaef3c8771ce3b6ed29d0c3dac1a540c11b6a (patch)
treeb3bc0ad8d9b1e264d7bdaaf6a96d64a58cfaebbf /lib/carlosgoce/layout
parent033cfbe2134f8798fb9f2836229e68689ad918cc (diff)
downloadpdf-calendars-f5dcaef3c8771ce3b6ed29d0c3dac1a540c11b6a.tar.gz
pdf-calendars-f5dcaef3c8771ce3b6ed29d0c3dac1a540c11b6a.tar.bz2
pdf-calendars-f5dcaef3c8771ce3b6ed29d0c3dac1a540c11b6a.zip
Improve simple layout design
Diffstat (limited to 'lib/carlosgoce/layout')
-rw-r--r--lib/carlosgoce/layout/layouts.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/carlosgoce/layout/layouts.rb b/lib/carlosgoce/layout/layouts.rb
index 65da961..a841e4f 100644
--- a/lib/carlosgoce/layout/layouts.rb
+++ b/lib/carlosgoce/layout/layouts.rb
@@ -10,10 +10,10 @@ module CarlosGoce
Prawn::Document.generate(file) do
font_size = 16
- data.each do |k, month|
- days = data[k][:formatted_days]
- cells = (days).to_a.each_slice(7).to_a
- cells.unshift [data[k][:name]]
+ data[:months].each do |k, month|
+ days = month[:formatted_days]
+ cells = days.to_a.each_slice(7).to_a
+ cells.unshift [month[:name]]
tables << make_table(cells, cell_style: {align: :center, size: 7, border_width: 0})
end