Ruby | Rational numerator() function
The numerator() is an inbuilt function in Ruby returns the numerator. Syntax: rat.numerator() Parameters: The function accepts no parameter Return Value: It returns the numerator Example 1: # Ruby program for numerator() method # Initialize rational number rat1 = Rational(7, -3) # Prints the rationa