From: Joel Pearson Date: 2013-06-18T00:56:10+09:00 Subject: Re: Comparing objects You can define the method <=> to allow comparison between objects. def <=> other bar <=> other.bar end or maybe something like this? def <=> other ( bar + baz ) <=> ( other.bar + other.baz ) end -- Posted via http://www.ruby-forum.com/.