This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

truncate

        # BigDecimal.truncate

(from ruby core)
---
    truncate(n)

---

Truncate to the nearest integer (by default), returning the result as a
BigDecimal.

    BigDecimal('3.14159').truncate #=> 3
    BigDecimal('8.7').truncate #=> 8
    BigDecimal('-9.9').truncate #=> -9

If n is specified and positive, the fractional part of the result has no
more than that many digits.

If n is specified and negative, at least that many digits to the left of
the decimal point will be 0 in the result.

    BigDecimal('3.14159').truncate(3) #=> 3.141
    BigDecimal('13345.234').truncate(-2) #=> 13300.0



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.