Decimal.+
+that
Group: Operators
Aliases: plus
Documentation
Adds a Decimal
to another Decimal
or other kind of number.
Arguments to +
will undergo automatic conversions such that you need not convert other numeric types to Decimal
manually.
Arguments
that
: The number to add to this.
Examples
Adding 10.22 and 20.33.
a = Decimal.new "10.22"
b = Decimal.new "20.33"
c = a + b
# => Decimal.new 30.55