From: Wakou Aoyama Date: 1999-07-25T08:16:33+09:00 Subject: [ruby-talk:00524] Re: CGI.rb CGI.rb included rd(Ruby Document). $ dr2html CGI.rb > CGI.rb.html ftp://ftp.netlab.co.jp/pub/lang/ruby/contrib/dr2html and other mirror site. On Sun, Jul 25, 1999 at 04:59:12AM +0900, OZAWA Sakuro wrote: > # sample > headings = [ "Name", "Age" , "Sex" ] > rows = [ > [ "Jack", "30", "M" ], > [ "Betty", "29", "F" ] > ] > > # x = CGI.new require 'CGI' x = CGI.new("html4") # or html4Tr or html4Fr # html3 is not support table element > print x.table(headings, rows) print x.table{ x.tr{ headings.collect{|i| x.th{i} } } + rows.collect{|row| x.tr{ row.collect{|i| x.td{i} } } }.join("") } > print x.table(headings, rows, true) print x.table({"BORDER"=>true}){ x.tr{ headings.collect{|i| x.th{i} } } + rows.collect{|row| x.tr{ row.collect{|i| x.td{i} } } }.join("") } > print x.table(headings, rows, "5px") print x.table({"BORDER"=>"5px"}){ x.tr{ headings.collect{|i| x.th{i} } } + rows.collect{|row| x.tr{ row.collect{|i| x.td{i} } } }.join("") } -- Wakou Aoyama