James Gray
12/11/2005 9:33:00 PM
On Dec 11, 2005, at 3:29 PM, Dirk Meijer wrote:
> hi everyone,
> i've created a class, and want it to be comparable with itself, but
> i don't
> know what to place inside the <=> method.
> the basic idea is that one of the values of the class (which is a
> symbol) is
> converted to a string, which is then compared.
Like this?
def <=>( other )
sym.to_s <=> other.sym.to_s
end
James Edward Gray II