Sha256: 8dce65f709e1890b8a6ac3f47224182e6c7673f5b40506f59ab98026809dde60
Contents?: true
Size: 255 Bytes
Versions: 5
Compression:
Stored size: 255 Bytes
Contents
class Numeric def with_precision precision precision = precision.to_i if precision > 0 factor = 10 ** precision (self * factor).truncate / factor.to_f else self.truncate end end unless respond_to? :with_precision end
Version data entries
5 entries across 5 versions & 1 rubygems