About Books Credits Photos Software Rumblings Travelling Home
Ruport: The simple things

Ruport is invaluable in speeding up report creation from a database, a CSV file and producing…well, just about any output if can put your mind to it. The html functionality is currently my favorite, as it makes rutema’s web interface that much faster to implement (and our currently vaporware rubot benefits as well).

With all the talk of ActiveRecord databases and CSV files though, I lose the way to implement the simplest case: Report on the data of a table.

Here’s the mental note for this:

require ‘rubygems’

require ‘ruport’

t=Ruport::Data::Table.new :column_names=>[“Ha”,”Hou”,”Hi”,”He”]

t<<[“bla”,”blou”,”bli”,”ble”]

puts t.to_html

gets us:

HaHouHiHe
blabloublible

which looks silly in the current CSS :)