method

maximum

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Enumerable
maximum(key) public

Calculates the maximum from the extracted elements.

payments = [Payment.new(5), Payment.new(15), Payment.new(10)]
payments.maximum(:price) # => 15
Show source
Register or log in to add new notes.