From: Tim Pease Date: 2008-07-18T13:09:15+09:00 Subject: Re: generating webpages with Ruby... help with double quotes On Jul 17, 2008, at 9:09 PM, Zoe Phoenix wrote: > I want a program that I'm working on to generate some web pages for > me, > but I'm having trouble with generating the pages in HTML, since it > uses > the double quotes for links, as in href="http://www.blahblahblah.com">. > > Since there are a lot of the links in this page, I need to know what > the > best way to get around this problem is. Can someone help me, please? The are a few different ways to construct your HTML output: %q(

your html code goes here) %Q(

just another form that supports #{variable} expansion) <<-HTML

and the big daddy of them all -- the heredoc format

this will create a single string from the all the text found between the opening <<-HTML marker above and the closing HTML marker below

you can use any uppercase string to mark your heredoc

heredocs also support #{variable} substitution