class Range

Extensions to the Range class

Public Instance Methods

pick_one() click to toggle source

This method returns a random number between the lower and upper bound

# File lib/rbot/core/utils/extends.rb, line 190
def pick_one
  len = self.last - self.first
  len += 1 unless self.exclude_end?
  self.first + Kernel::rand(len)
end
Also aliased as: rand
rand()
Alias for: pick_one