Sha256: 88e27973951d531a9cee0db1114ce7b7dc44d0693cec40eede5fe11107210666
Contents?: true
Size: 184 Bytes
Versions: 2
Compression:
Stored size: 184 Bytes
Contents
class Rational # calculates the reciprocal # @example # Rational(2/3).reciprocal #=> Rational(3/2) # @return [Rational] the reciprocal def reciprocal 1 / self end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rodders-0.2.0 | lib/Rational.rb |
rodders-0.1.2 | lib/Rational.rb |