class Numbers

Public Class Methods

new(array) click to toggle source
# File lib/request_master/req_stats.rb, line 14
def initialize (array)
  @array = array
end

Public Instance Methods

average() click to toggle source
# File lib/request_master/req_stats.rb, line 26
def average
  sum.to_f / @array.size
end
method_missing(method, *args, &block) click to toggle source
# File lib/request_master/req_stats.rb, line 18
def method_missing (method, *args, &block)
  @array.send(method, *args, &block)
end
sum() click to toggle source
# File lib/request_master/req_stats.rb, line 22
def sum
  @array.inject(0) { |acc, num| acc + num }
end