Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/bini/mixins.rb
Overview
A mixin for [Array]
Instance Method Summary collapse
-
#rand ⇒ Object
Return a random element from the Array.
Instance Method Details
#rand ⇒ Object
Return a random element from the Array.
4 5 6 |
# File 'lib/bini/mixins.rb', line 4 def rand self[Random.rand(self.count)] end |