Class: RoodiAnalyzer
Constant Summary
collapse
- COLUMNS =
%w{problems}
Instance Method Summary
collapse
#average, #identity, #percentile, #present, #sum
Instance Method Details
#columns ⇒ Object
6
7
8
|
# File 'lib/base/roodi_analyzer.rb', line 6
def columns
COLUMNS
end
|
#generate_records(data, table) ⇒ Object
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/base/roodi_analyzer.rb', line 26
def generate_records(data, table)
return if data==nil
Array(data[:problems]).each do |problem|
table << {
"metric" => name,
"problems" => problem[:problem],
"file_path" => problem[:file]
}
end
end
|
#name ⇒ Object
10
11
12
|
# File 'lib/base/roodi_analyzer.rb', line 10
def name
:roodi
end
|
#reduce(scores) ⇒ Object
18
19
20
|
# File 'lib/base/roodi_analyzer.rb', line 18
def reduce(scores)
ScoringStrategies.sum(scores)
end
|
#score(metric_ranking, item) ⇒ Object
22
23
24
|
# File 'lib/base/roodi_analyzer.rb', line 22
def score(metric_ranking, item)
ScoringStrategies.percentile(metric_ranking, item)
end
|