Ruby | Numeric truncate() function
The truncate() is an inbuilt method in Ruby returns a number rounded toward zero with a precision of the given number of digits after the decimal point. In case the number of digits is not given, the default value is taken to be zero. Syntax: num.truncate(ndigits) Parameters: The function needs a nu