@xs商店的网址一样www.yahoo.com,www.google.comon Rails的插入到Ruby的实例变量新项目
for x in @xs
y = x... #do something with x
@result += y #i want to do something like that. i want to store them in @result. What do i have to write in here?
end
对不起,noob问题。顺便说一句,你怎么称呼@result?它是一个实例变量还是数组?
@result将被每次迭代覆盖 - 我不认为这就是你想如何去做 – 2009-12-16 22:14:59