Class: MetricFu::RoodiGrapher

Inherits:
Grapher
  • Object
show all
Defined in:
lib/graphs/roodi_grapher.rb

Direct Known Subclasses

RoodiBluffGrapher, RoodiGchartGrapher

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

Instance Method Summary collapse

Methods inherited from Grapher

require_graphing_gem

Methods included from GchartGrapher

#determine_y_axis_scale

Constructor Details

#initializeRoodiGrapher

Returns a new instance of RoodiGrapher.



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

def initialize
  super
  @roodi_count = []
  @labels = {}
end

Instance Attribute Details

#labelsObject

Returns the value of attribute labels.



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

def labels
  @labels
end

#roodi_countObject

Returns the value of attribute roodi_count.



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

def roodi_count
  @roodi_count
end

Instance Method Details

#get_metrics(metrics, date) ⇒ Object



13
14
15
16
# File 'lib/graphs/roodi_grapher.rb', line 13

def get_metrics(metrics, date)
  @roodi_count.push(metrics[:roodi][:problems].size)
  @labels.update( { @labels.size => date })
end