File: random.rb

# random.rb

Path: | lib/more/facets/random.rb
Last Update: | Tue Aug 10 17:25:06 -0600 2010

# Random

Randomization core extension methods.

This library extends Object, Array, String and Hash with randomization methods. Most of the methods are of one of two kinds. Either they "pick" a random element from the reciever or they randomly "shuffle" the reciever.

The most common example is Array#shuffle, which simply randmomizes the order of an array‘s elements.

      [1,2,3].shuffle  #=> [2,3,1]

The other methods do similar things for their respective classes.

## Authors

- Ilmari Heikkinen <kig@misfiring.net>
- Christian Neukirchen <chneukirchen@gmail.com>
- Thomas Sawyer

## Copying

Copyright (c) 2005 Ilmari Heikkinen, Christian Neukirchen, Thomas Sawyer

Ruby License

This module is free software. You may use, modify, and/or redistribute this software under the same terms as Ruby.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

### Required files

facets/hash/zipnew facets/string/shatter

[Validate]