PDF::Writer:PDF::SimpleTable::Column#heading, #heading=
require 'pdf/simpletable' pdf = PDF::Writer.new PDF::SimpleTable.new do |tab| tab.column_order = %w(col1 col2 col3) tab.show_lines = :all tab.show_headings = true tab.orientation = :center tab.position = :center tab.columns["col1"] = PDF::SimpleTable::Column.new("COL1") { |col| col.heading = "FOO" } p tab.columns["col1"].heading p tab.columns["col1"].heading.title data = [ { "col1" => "foo", "col2" => "bar", "col3" => "baz" }, ] tab.data.replace data tab.render_on(pdf) end pdf.save_as("2008031600.pdf")
で、
#<PDF::SimpleTable::Column::Heading:0x40369148 @title="FOO"> "FOO"