Class: Range

Inherits:
Object show all
Defined in:
lib/rubyexts/random.rb

Instance Method Summary collapse

Instance Method Details

#randObject Also known as: random

Returns random item from the array

Returns:

  • (Object)

    Random item from range

Author:

  • Botanicus

Since:

  • 0.0.2



21
22
23
# File 'lib/rubyexts/random.rb', line 21

def rand
  self.min + Kernel.rand(self.max)
end