Anders' answer is correct, however for utility methods such as mean you do not need to use a class, you can put this method in module :
module MyUtils def self.mean(values)
The method will be called in the same way:
avg = MyUtils.mean([1,2,3,4,5])
mikej
source share