| Rectangle comparable by area Comparable is one of the most popular modules in Ruby. Its purpose is to provide with convenience comparison methods. To use it, you have to include Comparable and define the space-ship operator (<=>): Syntax include Comparable - implement the space-ship operator (
<=>) Parameters | Parameter | Details | | other | The instance to be compared to self | x <=> y should return a negative number if x < y, zero if x == y and a positive number if x > y.
|