Class: Rational

Inherits:
Object
  • Object
show all
Defined in:
lib/FixedOdds.rb

Instance Method Summary collapse

Instance Method Details

#reciprocalRational

calculates the reciprocal

Examples:

Rational(2/3).reciprocal #=> Rational(3/2)

Returns:



169
170
171
# File 'lib/FixedOdds.rb', line 169

def reciprocal
  1 / self
end