method

to_i

ruby latest stable - Class: BigDecimal
to_i()
public

Returns the value as an Integer.

If the BigDecimal is infinity or NaN, raises FloatDomainError.