aboutsummaryrefslogtreecommitdiffstats
path: root/lib/carlosgoce
diff options
context:
space:
mode:
Diffstat (limited to 'lib/carlosgoce')
-rw-r--r--lib/carlosgoce/layout/layouts.rb11
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