From: Greg Barozzi Date: 2009-11-05T13:31:19+09:00 Subject: Re: Create HTML files using RUBY Krithika San wrote: > Hi, > > How do you create HTML files using RUBY. I have a requirement where I > need to set color and font of the text, and also provide formatting > options for tables having different colors for rows and border(on/off). > > Can anybody tell how to do this > > Thanks, > K If I was going to write this myself I'd try something like: def h1 print "

" yield print "

" end h1 do print "I'm a heading!" end =>

I'm a heading!

By yielding to the block you allow yourself to nest other tags inside of tags which is something you often have to do when writing html. Good luck. -- Posted via http://www.ruby-forum.com/.