From: Zoe Phoenix Date: 2008-07-20T06:28:32+09:00 Subject: Re: repeat a method inside a string Michael Guterl wrote: > On Sat, Jul 19, 2008 at 3:44 PM, Zoe Phoenix > wrote: >> ... >> times in that spot instead of just once. Help, please..? > Why not just write a method that calls the other method 30 times and > collects the results in an array, then joins them to a string? > > def foo > r = [] > 30.times do > r << insertlink > end > r.join(' ') > end > > HTH, > Michael Guterl That would probably make the most sense... but, since I'm still a fetus programmer (I'm not even a baby yet >.>; ), I didn't think of doing that. :-p Many thanks! -- Posted via http://www.ruby-forum.com/.