From: Bertram Scharpf Date: 2005-03-06T20:21:58+09:00 Subject: Re: (Ab)using class CGI as non-CGI HTML generator? Hi, Am Sonntag, 06. M�r 2005, 07:13:10 +0900 schrieb Josef 'Jupp' Schugt: > If not running as CGI, Ruby programs using class CGI expect name=value > pairs on standard input. Is there a way of suppressing this if one is > (ab)using CGI to generate HTML for other purposes than CGI scripts (like > generating HTML mails)? First, I think CGI handling should be derived from HTML generation, not vice versa. Anyway, it should not actually be expensive to do somethig between `puts "

#{...}

"' and reimplementing CGI#element_init. Using brute force you can try: ENV['REQUEST_METHOD'] = 'GET' c = CGI.new 'html4' I wouldn't like doing that but maybe you don't mind. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de