Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/extensions/array.rb
Instance Method Summary collapse
Instance Method Details
#rand ⇒ Object
2 3 4 |
# File 'lib/extensions/array.rb', line 2 def rand self[Kernel.rand(length)] end |
#shuffle ⇒ Object
6 7 8 |
# File 'lib/extensions/array.rb', line 6 def shuffle self.sort_by{Kernel.rand} end |