Sha256: d76b66a653bab841cead2ba78a50a63c1bcfd48262ad25745e29f5c0e9e018d6
Contents?: true
Size: 225 Bytes
Versions: 9
Compression:
Stored size: 225 Bytes
Contents
module Enumerable def ave sum = 0 self.each{|value| sum += value} return sum.to_f/self.length end if RUBY_VERSION < '1.9.0' def sample me = to_a me[rand(me.length)] end end end
Version data entries
9 entries across 9 versions & 1 rubygems