Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/bini/mixins.rb

Overview

A mixin for [Array]

Instance Method Summary collapse

Instance Method Details

#randObject

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