How do you tell a Ruby program to wait an arbitrary amount of time before moving on to the next line of code?
Use sleep like so:
sleep 2
That'll sleep for 2 seconds.
Be careful to give an argument. If you just run sleep, the process will sleep forever. (This is useful when you want a thread to sleep until it's woken.)
sleep