method
max_by
max_by()
public
Returns the object in enum that gives the maximum value from the given block.
a = %w(albatross dog horse) a.max_by {|x| x.length } #=> "albatross"
max_by()
public
Returns the object in enum that gives the maximum value from the given block.
a = %w(albatross dog horse) a.max_by {|x| x.length } #=> "albatross"