Module: MiGA::Result::Stats
- Included in:
- MiGA::Result
- Defined in:
- lib/miga/result/stats.rb
Overview
Helper module including stats-specific functions for results
Instance Method Summary collapse
-
#compute_stats ⇒ Object
(Re-)calculate and save the statistics for the result.
-
#stats ⇒ Object
Access the stats entry of results.
Instance Method Details
#compute_stats ⇒ Object
(Re-)calculate and save the statistics for the result
8 9 10 11 12 13 14 15 16 17 |
# 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 |
#stats ⇒ Object
Access the stats entry of results
21 22 23 |
# File 'lib/miga/result/stats.rb', line 21 def stats self[:stats] end |