Subject: Re: Best practice to use Enumerable#Sort and Enumerable#Sort_by
From: John W Higgins <wishdev@ a . m
Date: Sat, 29 Jun 2013 05:45:48 +0900
References: 408571
In-reply-to: 408571
The #sort_by block tells the engine which field to use when sorting an item.
The #sort block gets called with the 2 items being compared and the block
should return how the items compare (-1, 0, 1).
John