Sha256: 81c4680f09dd41b73c4a60b04f592cf01025ff088bfee25cae84270e0bed940c
Contents?: true
Size: 922 Bytes
Versions: 8
Compression:
Stored size: 922 Bytes
Contents
require 'gruff' module MetricFu class RoodiGrapher attr_accessor :roodi_count, :labels def initialize self.roodi_count = [] self.labels = {} end def get_metrics(metrics, date) self.roodi_count.push(metrics[:roodi][:problems].size) self.labels.update( { self.labels.size => date }) end def graph! g = Gruff::Line.new(MetricFu.graph_size) g.title = "Roodi: design problems" g.theme = MetricFu.graph_theme g.font = MetricFu.graph_font g.data('roodi', self.roodi_count) g.labels = self.labels g.title_font_size = MetricFu.graph_title_font_size g.legend_box_size = MetricFu.graph_legend_box_size g.legend_font_size = MetricFu.graph_legend_font_size g.marker_font_size = MetricFu.graph_marker_font_size g.write(File.join(MetricFu.output_directory, 'roodi.png')) end end end
Version data entries
8 entries across 8 versions & 4 rubygems