From: dblack@... Date: 2002-08-11T10:04:34+09:00 Subject: Re: extend Html4? Hi -- On Sun, 11 Aug 2002, Philip Mak wrote: > On Sun, Aug 11, 2002 at 09:16:01AM +0900, dblack@candle.superlink.net wrote: > > You can include the module, but keep reading below.... > > > > require 'cgi' > > include CGI::Html3 > > cgi = CGI.new("html3") > > puts html { h1 { "hi" } } > > Hmm, it's a little weird that the html, h1, etc. methods won't work > until CGI.new has been called. That's because cgi.rb does a bunch of dynamic creation of methods. (Look at #element_init, of which there's one in each of the Html* modules.) So those methods don't actually exist until the CGI object is created. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav