Sha256: 5fc5ab9a0f44ceb6455b13a086f3ee5d0f7fc305480b7906d7c5d742d8b96086
Contents?: true
Size: 352 Bytes
Versions: 79
Compression:
Stored size: 352 Bytes
Contents
#This module is used to handel various random handeling. module Knj::Rand #Returns a random integer between the two integers given. def self.range(first, last) return first.to_i + rand(last.to_i - first.to_i) end #Returns a random element in the given array. def self.array(arr) key = rand(arr.length) return arr[key] end end
Version data entries
79 entries across 79 versions & 1 rubygems