Ruby Max Method
Today I learned how to do the “.max_by” method in Ruby. What this does is that it takes a countable collection and returns the item that qualifies as the maximum. See the example:
The .max_by method, is that it is a really efficient way to do complex comparisons. It stores…