Module: Array::AtRandom

Defined in:
lib/vex/base/array/at_random.rb

Defined Under Namespace

Modules: Etest

Instance Method Summary collapse

Instance Method Details

#at_randomObject


2
3
4
# File 'lib/vex/base/array/at_random.rb', line 2

def at_random
  self[Kernel.rand(length)] unless empty?
end