Random Integer

Generate a random integer within an inclusive range specified by minimum and maximum values.

Code

General
rand(min..max)

Parameters

Minimum value (inclusive)

Maximum value (inclusive)

Server

More Ruby Snippets