What does the max_by method do in Ruby enumerators?
A. Returns the maximum value in a collection
B. Returns the element with the maximum index
C. Returns the element with the maximum length
D. Returns the element with the maximum value based on a given condition
Answer: Option D
Join The Discussion