2007/10/31, Michel Demazure <michel / demazure.com>:
> Konrad Meyer wrote:
> > Quoth Martin DeMello:
> >>    end
> >> end
> >>
> >> class Klass1
> >>   include Ordered
> >>
> >>   def less_than_or_equal? other
> >>      # stuff
> >>   end
> >> end
> >
> > And instead of #le?, why not #<, #==, #>, #<=>?
>
> #< looks good. Thanks.

Also keep attention to module Comparable
http://www.ruby-doc.org/core/classes/Comparable.html

Basically you need to only implement <=> and get all other operators for free.

Btw, what do you need min and max for?

Kind regards

robert

-- 
use.inject do |as, often| as.you_can - without end