Sha256: a6d8ddb373deaea578b23fdb5dbb0efc547d6ad26e2ebffec3dec62f76fe9eee
Contents?: true
Size: 263 Bytes
Versions: 10
Compression:
Stored size: 263 Bytes
Contents
module JsonTestData module NumberHelper def between(min:, max:, integer: false) return integer ? mean(min, max).round(0) : mean(min, max) end private def mean(*numbers) numbers.inject(:+).to_f.quo(numbers.length) end end end
Version data entries
10 entries across 10 versions & 1 rubygems