I know I can do
@somethings.each do |something|
/*some work with something*/
end
but I want to know if I can loop over @somethings with a for
I tried
for i in 0..10
@somethings[i].myattribute
end
but it is not giving me the object I want, or any object as far as I know.
I need to use the for loop, I cannot do what I want with “each”. So is it possible to use a for loop somehow?
or weird
ok