From: Patrick Hurley Date: 2006-06-04T23:12:15+09:00 Subject: Re: This is brain dead, but is it stupid? On 6/2/06, Jeff Pritchard wrote: > Elliot Temple wrote: > > I don't think the replace technique is very elegant. One thing you > > can do instead is make a string with %s for holes: > > > > irb(main):001:0> x = "1 %s 3" > > => "1 %s 3" > > irb(main):003:0> x %2 > > => "1 2 3" > > > > -- Elliot Temple > > http://www.curi.us/blog/ > > So my multiline gsub tempstring " width=\"replace_with_width\" height=\"replace_with_height\">\n" > nastiness would become: > > @barString = %Q(\n) > @htmlString << @barString % [barWidth,barHeight] > > yes? > > Very cool language. > > thanks, > jp > > -- > Posted via http://www.ruby-forum.com/. > > Or you could just: @htmlString = %Q(\n) pth