Sha256: 1150a2a8ca7e6baa1d5a2f722a5baf9a30d78ff85917292a1c45b77e660f9420

Contents?: true

Size: 169 Bytes

Versions: 2

Compression:

Stored size: 169 Bytes

Contents

class Rational
  # calculates the reciprocal of the rational number
  #--
  # Would be better if wrote reciprocal! method instead
  def reciprocal
    1 / self
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rodders-0.1.1 lib/Rational.rb
rodders-0.1.0 lib/Rational.rb