Class: MetricFu::RailsBestPracticesGrapher

Inherits:
Grapher
  • Object
show all
Defined in:
lib/graphs/rails_best_practices_grapher.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 collapse

Attributes inherited from Grapher

#labels

Instance Method Summary collapse

Methods inherited from Grapher

require_graphing_gem

Methods included from GchartGrapher

#determine_y_axis_scale

Constructor Details

#initializeRailsBestPracticesGrapher

Returns a new instance of RailsBestPracticesGrapher.



7
8
9
10
# File 'lib/graphs/rails_best_practices_grapher.rb', line 7

def initialize
  super
  @rails_best_practices_count = []
end

Instance Attribute Details

#rails_best_practices_countObject

Returns the value of attribute rails_best_practices_count.



5
6
7
# File 'lib/graphs/rails_best_practices_grapher.rb', line 5

def rails_best_practices_count
  @rails_best_practices_count
end

Instance Method Details

#get_metrics(metrics, date) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/graphs/rails_best_practices_grapher.rb', line 12

def get_metrics(metrics, date)
  super
  if metrics[:rails_best_practices] && metrics[:rails_best_practices][:problems]
    size = metrics[:rails_best_practices][:problems].size
  else
    size = 0
  end
  @rails_best_practices_count.push(size)
end