> It's generally preferred to use pieces of code that are syntactically
> correct and do something.  That makes everyone's lives easier. :-) 

Thanks, I will do so in the future.  Sorry about confusion that I may have
caused.

>>  def sort_obj(objects,attr)
>>    objects.sort_by {|o| o.send(attr)}
>>  end

> Not really worth a method IMHO bur YMMV. 

Yeah, suspect you're right there too, but it helps code readibility for me
as I'm still learning.

Anyway, thanks again for your help, it works like a charm.
--
View this message in context: http://www.nabble.com/Evaluating-the-string-in-a-variable-to-use-as-a-method-name-t1292849.html#a3457259
Sent from the ruby-talk forum at Nabble.com.