lib/Rational.rb in rodders-0.1.1 vs lib/Rational.rb in rodders-0.1.2

- old
+ new

@@ -1,8 +1,9 @@ class Rational - # calculates the reciprocal of the rational number - #-- - # Would be better if wrote reciprocal! method instead + # calculates the reciprocal + # @example + # Rational(2/3).reciprocal #=> Rational(3/2) + # @return [Rational] the reciprocal def reciprocal 1 / self end end \ No newline at end of file