Class: MetricFu::ReekBluffGrapher
- Inherits:
-
ReekGrapher
- Object
- Grapher
- ReekGrapher
- MetricFu::ReekBluffGrapher
- 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 ReekGrapher
Instance Method Summary collapse
Methods inherited from ReekGrapher
Methods inherited from Grapher
#initialize, require_graphing_gem
Methods included from GchartGrapher
Constructor Details
This class inherits a constructor from MetricFu::ReekGrapher
Instance Method Details
#graph! ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/graphs/engines/bluff.rb', line 57 def graph! legend = @reek_count.keys.sort data = "" legend.each do |name| data += "g.data('#{name}', [#{@reek_count[name].join(',')}])\n" end content = <<-EOS #{BLUFF_DEFAULT_OPTIONS} g.title = 'Reek: code smells'; #{data} g.labels = #{@labels.to_json}; g.draw(); EOS File.open(File.join(MetricFu.output_directory, 'reek.js'), 'w') {|f| f << content } end |