class Rational # calculates the reciprocal # @example # Rational(2/3).reciprocal #=> Rational(3/2) # @return [Rational] the reciprocal def reciprocal 1 / self end end