Sha256: babb7f7d3af90892fff400e321cb39d1217476feae1fe5edec98ff8e40f06929
Contents?: true
Size: 839 Bytes
Versions: 2
Compression:
Stored size: 839 Bytes
Contents
DecNumber is a wrapper around ICU-decNumber (Copyright (c) IBM Corporation) that subclasses Numeric. The main benefit over BigDecimal and other things is that each instance carries it's own context around with it in a DecContext object. The context is what dertimines the precision and rounding behavior. An example is a database with Decimal columns with differing precision and where you can't accept using Floats. I don't expect to instantiate these object directly, instead I will bind them to SQL Decimal in an ORM, or using some sort of Money class. If you'd like to help out, please write tests! Currently they try to give you back DecNumber objects whenever used, including as the rval with another Numeric. TODO: Most of the methods should accept a context as an argument. Currently the context is attached to the receiver.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dec_number-0.2.1 | README |
dec_number-0.2.0 | README |