File: matrix_spec.rb

package info (click to toggle)
ruby-rghost 0.9.9-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,188 kB
  • sloc: ruby: 3,374; makefile: 6; sh: 1
file content (20 lines) | stat: -rw-r--r-- 481 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require "./lib/rghost"

# describe  RGhost::Grid::Base do
# it "should generate for ruby 1.9" do
vals = [
  ["col1", "col2"], ["anothercol", "anothercol2"]
]

doc = RGhost::Document.new
doc.matrix_grid(align: :center, width: 8) do |grid|
  grid.style :bottom_lines
  grid.column title: "First column", width: 3.5
  grid.column title: "Second Column", width: 3.5
  grid.data(vals)
end
doc.render :pdf, filename: "/tmp/sample.pdf", debug: true, logfile: "/tmp/foo.txt"

# end

# end