On 10/2/07, Jenny Purcell <dontspamme / spam.com> wrote:
> Background: I'm working on a Ruby program to simulate horse races for
> a fantasy horse racing league. It works off a csv file I put together
> by hand with the information necessary for each race.

> What I'd like to be able to do, now, is provide minimally formatted
> html "results" for each race.

Hi,

I think you should take a look into ERB
(http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/). With this you can
have a template file or string with the HTML and a syntax to evaluate
some ruby code inside it, like evaluating your variables, etc. You can
then output the result of evaluating the template back into a file.

Hope this helps,

Jesus.

PS: sorry, I don't have time now to work out an example, but I hope
this gets you started.