Flowdock
<=>(p1) public

Performs comparison and returns -1, 0, or +1.

For example:

Rational(2, 3)  <=> Rational(2, 3)  #=> 0
Rational(5)     <=> 5               #=> 0
Rational(2,3)   <=> Rational(1,3)   #=> 1
Rational(1,3)   <=> 1               #=> -1
Rational(1,3)   <=> 0.3             #=> 1
Show source
Register or log in to add new notes.