Ruby: Looping a specific number of times