class StatisticsHelper::Statistics

Public Class Methods

new() click to toggle source
# File lib/helpers/statistics.rb, line 17
def initialize
        @statistics = Series.new
end

Public Instance Methods

+(statistics) click to toggle source
# File lib/helpers/statistics.rb, line 37
def +(statistics)
        @statistics + statistics.data
end
<<(statistic) click to toggle source
# File lib/helpers/statistics.rb, line 33
def <<(statistic)
        add(statistic)
end
add(statistic) click to toggle source
# File lib/helpers/statistics.rb, line 21
def add(statistic)
        @statistics << statistic
end
average()
Alias for: mean
avg()
Alias for: mean
count() click to toggle source
# File lib/helpers/statistics.rb, line 25
def count
        @statistics.count
end
data() click to toggle source
# File lib/helpers/statistics.rb, line 41
def data
        @statistics
end
mean() click to toggle source
# File lib/helpers/statistics.rb, line 29
def mean
        @statistics.mean
end
Also aliased as: average, avg