Skip to content

Tag Archives: Ruby Random-class

Random#rand() : rand() is a Random class method which generates a random value. Syntax: Random.rand() Parameter: Random values Return: generates a random value. Example #1… Read More
Random#new_seed() : new_seed() is a Random class method which returns a random seed value. Syntax: Random.new_seed() Parameter: Random values Return: a random seed value Example… Read More
Random#new() : new() is a Random class method which creates a new PRNG using seed to set the initial state. Syntax: Random.new() Parameter: Random values… Read More
Random#uuid() : uuid() is a Random class method which checks returns a random v4 UUID (Universally Unique IDentifier). Syntax: Random.uuid() Parameter: Random values Return: a… Read More
Random#urlsafe_base64() : urlsafe_base64() is a Random class method which returns a random URL-safe base64 string. Syntax: Random.urlsafe_base64() Parameter: Random values Return: a random URL-safe base64… Read More
Random#random_bytes() : random_bytes() is a Random class method which returns a random random_binary string. Syntax: Random.random_bytes() Parameter: Random values Return: a random random_binary string. Example… Read More
Random#random_number() : random_number() is a Random class method which checks returns a random number from raw random bytes Syntax: Random.random_number() Parameter: Random values Return: random… Read More
Random#hex() : hex() is a Random class method which checks returns a random hexadecimal string. Syntax: Random.hex() Parameter: Random values Return: a random hexadecimal string.… Read More
Random#base64() : base64() is a Random class method which returns a random base64 string. Syntax: Random.base64() Parameter: Random values Return: a random base64 string. Example… Read More
Random#seed() : seed() is a Random class method which returns seed value used to initialize the generator Syntax: Random.seed() Parameter: Random values Return: seed value… Read More
Random#bytes() is a Random class method which returns random binary string containing size bytes. Syntax: Random.bytes() Parameter: Random values Return: random binary string containing size… Read More
Random#==() is a Random class method which checks whether the two random values are equal. Syntax: Random.==() Parameter: Random values Return: true – if random… Read More
Random#srand() : srand() is a Random class method which returns system pseudo-random number. Syntax: Random.srand() Parameter: Random values Return: system pseudo-random number. Example #1 :… Read More

Start Your Coding Journey Now!