numerator

rat.numerator â integer
Instance Public methods

Returns the numerator.

Rational(7).numerator        #=> 7
Rational(7, 1).numerator     #=> 7
Rational(9, -4).numerator    #=> -9
Rational(-2, -10).numerator  #=> 1
doc_ruby_on_rails
2015-05-01 04:07:20
Comments
Leave a Comment

Please login to continue.