Helper module including stats-specific functions for results
(Re-)calculate and save the statistics for the result
# File lib/miga/result/stats.rb, line 8 def compute_stats method = :"compute_stats_#{key}" MiGA::MiGA.DEBUG "Result(#{key}).compute_stats" stats = self.respond_to?(method, true) ? send(method) : nil unless stats.nil? self[:stats] = stats save end self[:stats] end
Access the stats entry of results
# File lib/miga/result/stats.rb, line 21 def stats self[:stats] end