Class: MetricFu::RcovGrapher
- Inherits:
-
Grapher
- Object
- Grapher
- MetricFu::RcovGrapher
show all
- Defined in:
- lib/metric_fu/metrics/rcov/grapher.rb
Instance Attribute Summary collapse
Attributes inherited from Grapher
#output_directory
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Grapher
#date, get_grapher, #graph!, graphers
Constructor Details
Returns a new instance of RcovGrapher.
10
11
12
13
14
|
# File 'lib/metric_fu/metrics/rcov/grapher.rb', line 10
def initialize
super
self.rcov_percent = []
self.labels = {}
end
|
Instance Attribute Details
#labels ⇒ Object
Returns the value of attribute labels.
4
5
6
|
# File 'lib/metric_fu/metrics/rcov/grapher.rb', line 4
def labels
@labels
end
|
#rcov_percent ⇒ Object
Returns the value of attribute rcov_percent.
4
5
6
|
# File 'lib/metric_fu/metrics/rcov/grapher.rb', line 4
def rcov_percent
@rcov_percent
end
|
Class Method Details
.metric ⇒ Object
6
7
8
|
# File 'lib/metric_fu/metrics/rcov/grapher.rb', line 6
def self.metric
:rcov
end
|
Instance Method Details
#data ⇒ Object
27
28
29
30
31
|
# File 'lib/metric_fu/metrics/rcov/grapher.rb', line 27
def data
[
["rcov", @rcov_percent.join(",")]
]
end
|
#get_metrics(metrics, date) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/metric_fu/metrics/rcov/grapher.rb', line 16
def get_metrics(metrics, date)
if metrics && metrics[:rcov]
rcov_percent.push(metrics[:rcov][:global_percent_run])
labels.update(labels.size => date)
end
end
|
#output_filename ⇒ Object
33
34
35
|
# File 'lib/metric_fu/metrics/rcov/grapher.rb', line 33
def output_filename
"rcov.js"
end
|
#title ⇒ Object
23
24
25
|
# File 'lib/metric_fu/metrics/rcov/grapher.rb', line 23
def title
"Rcov: code coverage"
end
|