Class: MetricFu::RcovBluffGrapher

Inherits:
RcovGrapher show all
Defined in:
lib/graphs/engines/bluff.rb

Constant Summary

Constants inherited from Grapher

Grapher::BLUFF_DEFAULT_OPTIONS, Grapher::BLUFF_GRAPH_SIZE

Constants included from GchartGrapher

GchartGrapher::COLORS, GchartGrapher::GCHART_GRAPH_SIZE, GchartGrapher::NUMBER_OF_TICKS

Instance Attribute Summary

Attributes inherited from RcovGrapher

#rcov_percent

Attributes inherited from Grapher

#labels

Instance Method Summary collapse

Methods inherited from RcovGrapher

#get_metrics, #initialize

Methods inherited from Grapher

#get_metrics, #initialize, require_graphing_gem

Methods included from GchartGrapher

#determine_y_axis_scale

Constructor Details

This class inherits a constructor from MetricFu::RcovGrapher

Instance Method Details

#graph!Object



44
45
46
47
48
49
50
51
52
53
# File 'lib/graphs/engines/bluff.rb', line 44

def graph!
  content = <<-EOS
    #{BLUFF_DEFAULT_OPTIONS}
    g.title = 'Rcov: code coverage';
    g.data('rcov', [#{@rcov_percent.join(',')}]);
    g.labels = #{@labels.to_json};
    g.draw();
  EOS
  File.open(File.join(MetricFu.output_directory, 'rcov.js'), 'w') {|f| f << content }
end