Class: MetricFu::FlogBluffGrapher
- Inherits:
-
FlogGrapher
- Object
- Grapher
- FlogGrapher
- MetricFu::FlogBluffGrapher
- 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 FlogGrapher
#flog_average, #top_five_percent_average
Attributes inherited from Grapher
Instance Method Summary collapse
Methods inherited from FlogGrapher
Methods inherited from Grapher
#get_metrics, #initialize, require_graphing_gem
Methods included from GchartGrapher
Constructor Details
This class inherits a constructor from MetricFu::FlogGrapher
Instance Method Details
#graph! ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/graphs/engines/bluff.rb', line 30 def graph! content = <<-EOS #{BLUFF_DEFAULT_OPTIONS} g.title = 'Flog: code complexity'; g.data('average', [#{@flog_average.join(',')}]); g.data('top 5% average', [#{@top_five_percent_average.join(',')}]) g.labels = #{@labels.to_json}; g.draw(); EOS File.open(File.join(MetricFu.output_directory, 'flog.js'), 'w') {|f| f << content } end |