Class: TableData::Presenters::PDF
Instance Attribute Summary
#table
Instance Method Summary
collapse
#initialize, present
Instance Method Details
#document ⇒ Object
11
12
13
14
15
16
|
# File 'lib/tabledata/presenters/pdf.rb', line 11
def document
pdf = Prawn::Document.new
pdf.table @table.data
pdf
end
|
#string(options = nil) ⇒ Object
18
19
20
|
# File 'lib/tabledata/presenters/pdf.rb', line 18
def string(options=nil)
document.render
end
|
#write(path, options = nil) ⇒ Object
22
23
24
|
# File 'lib/tabledata/presenters/pdf.rb', line 22
def write(path, options=nil)
document.render_file(path)
end
|