Class: StatsAnalyzer
- Inherits:
-
Object
- Object
- StatsAnalyzer
- Defined in:
- lib/base/stats_analyzer.rb
Constant Summary collapse
- COLUMNS =
%w{stat_name stat_value}
Instance Method Summary collapse
- #columns ⇒ Object
- #generate_records(data, table) ⇒ Object
- #map(row) ⇒ Object
- #name ⇒ Object
- #reduce(scores) ⇒ Object
- #score(metric_ranking, item) ⇒ Object
Instance Method Details
#columns ⇒ Object
5 6 7 |
# File 'lib/base/stats_analyzer.rb', line 5 def columns COLUMNS end |
#generate_records(data, table) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/base/stats_analyzer.rb', line 25 def generate_records(data, table) return if data == nil data.each do |key, value| next if value.kind_of?(Array) table << { "metric" => name, "stat_name" => key, "stat_value" => value } end end |
#map(row) ⇒ Object
13 14 15 |
# File 'lib/base/stats_analyzer.rb', line 13 def map(row) 0 end |
#name ⇒ Object
9 10 11 |
# File 'lib/base/stats_analyzer.rb', line 9 def name :stats end |
#reduce(scores) ⇒ Object
17 18 19 |
# File 'lib/base/stats_analyzer.rb', line 17 def reduce(scores) 0 end |
#score(metric_ranking, item) ⇒ Object
21 22 23 |
# File 'lib/base/stats_analyzer.rb', line 21 def score(metric_ranking, item) 0 end |