diff options
author | Carlos Goce <carlosgoce@gmail.com> | 2015-01-23 21:01:34 +0100 |
---|---|---|
committer | Carlos Goce <carlosgoce@gmail.com> | 2015-01-23 21:01:34 +0100 |
commit | f690f7da69f7dc9d19df0fdb378ca6a7f89d8a39 (patch) | |
tree | db5f7c6b075d427da27579445c0db9e56ad0fb8f /lib | |
parent | cf049dcdd8913bf79e5d33b41a5c5eda62d978e4 (diff) | |
download | pdf-calendars-f690f7da69f7dc9d19df0fdb378ca6a7f89d8a39.tar.gz pdf-calendars-f690f7da69f7dc9d19df0fdb378ca6a7f89d8a39.tar.bz2 pdf-calendars-f690f7da69f7dc9d19df0fdb378ca6a7f89d8a39.zip |
First design of the layout but incomplete
Diffstat (limited to 'lib')
-rw-r--r-- | lib/carlosgoce/layout/layouts.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/carlosgoce/layout/layouts.rb b/lib/carlosgoce/layout/layouts.rb index 8cdb420..946285d 100644 --- a/lib/carlosgoce/layout/layouts.rb +++ b/lib/carlosgoce/layout/layouts.rb @@ -1,12 +1,19 @@ require 'rubygems' -require 'Prawn' +require 'prawn' +require 'prawn/table' module CarlosGoce module Layout class Simple def create (file, data, year) Prawn::Document.generate(file) do - text 'Hello World' + data.each do |k, month| + days = data[k][:days] + + text data[k][:name] + cells = (days).to_a.each_slice(7).to_a + table cells, :cell_style => {:align => :center} + end end end end |