EnumExtras.weighted_average
You're seeing just the function
weighted_average
, go back to EnumExtras module for more information.
Specs
Calculates the weighted average of the elements in the enumerable
.
It should return nil
if the enumerable
is empty or the weights sum to zero.