How to get a random number in Ruby

How do I generate a random number between 0 and n ?