N回ごとにループの関数を変更するエレガントな「ルビー」の方法は何ですか? (1..50).each do |i|list 内のすべてのオブジェクトを反復処理したいので、使用しないことをお勧めしますobjects。
objects.each do |object|
#Do this with object information
#Do not do this if this is the third time through the loop
end
N回ごとにループの関数を変更するエレガントな「ルビー」の方法は何ですか? (1..50).each do |i|list 内のすべてのオブジェクトを反復処理したいので、使用しないことをお勧めしますobjects。
objects.each do |object|
#Do this with object information
#Do not do this if this is the third time through the loop
end