src code
Enumerable#sortBy(iterator[, context]) → Array
Provides a custom-sorted view of the elements based on the criteria computed, for each element, by the iterator.