class MetricFu::StatsGrapher
Attributes
labels[RW]
loc_counts[RW]
lot_counts[RW]
Public Class Methods
metric()
click to toggle source
# File lib/metric_fu/metrics/stats/grapher.rb, line 6 def self.metric :stats end
new()
click to toggle source
Calls superclass method
# File lib/metric_fu/metrics/stats/grapher.rb, line 10 def initialize super self.loc_counts = [] self.lot_counts = [] self.labels = {} end
Public Instance Methods
data()
click to toggle source
# File lib/metric_fu/metrics/stats/grapher.rb, line 29 def data [ ["LOC", @loc_counts.join(",")], ["LOT", @lot_counts.join(",")], ] end
get_metrics(metrics, date)
click to toggle source
# File lib/metric_fu/metrics/stats/grapher.rb, line 17 def get_metrics(metrics, date) if metrics && metrics[:stats] loc_counts.push(metrics[:stats][:codeLOC].to_i) lot_counts.push(metrics[:stats][:testLOC].to_i) labels.update(labels.size => date) end end
output_filename()
click to toggle source
# File lib/metric_fu/metrics/stats/grapher.rb, line 36 def output_filename "stats.js" end
title()
click to toggle source
# File lib/metric_fu/metrics/stats/grapher.rb, line 25 def title "Stats: LOC & LOT" end