class Array

Ruby Array

Public Instance Methods

average() click to toggle source

If an array is all numbers This displayes the mean average

# File lib/allotment/array.rb, line 6
def average
  inject(:+).to_f / size
end