Redirect mod_ruby output

I want to pipe all the output of my mod_ruby/eruby script through a program
(HTML tidy) before sending it to the browser. Before I dive into Apache
programming, is there an easy way to do this in Ruby? eg open a program the
way I would a file and redirect stdout to the program and the program’s
output to the existing stdout? I’m pretty sure I could figure how to do this
from the pickaxe, but I’m asking here because I’m not sure how this will play
with mod_ruby, since I assume that mod_ruby redirects stdout itself…

Tim Bates

···


tim@bates.id.au