Parse a decimal value from a String in Ruby
(Found it myself after a bit of digging)
BigDecimal is the standard Ruby fixed-point type, and it's constructor takes a String and handles the parsing for you:
BigDecimal.new("123.45")
(Found it myself after a bit of digging)
BigDecimal is the standard Ruby fixed-point type, and it's constructor takes a String and handles the parsing for you:
BigDecimal.new("123.45")