Class: MetricFu::FlogGrapher

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

Direct Known Subclasses

FlogBluffGrapher, FlogGchartGrapher

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

#initializeFlogGrapher

Returns a new instance of FlogGrapher.


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

def initialize
  super
  @flog_average = []
  @top_five_percent_average =[]
end

Instance Attribute Details

#flog_averageObject

Returns the value of attribute flog_average


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

def flog_average
  @flog_average
end

#top_five_percent_averageObject

Returns the value of attribute top_five_percent_average


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

def top_five_percent_average
  @top_five_percent_average
end

Instance Method Details

#get_metrics(metrics, date) ⇒ Object


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

def get_metrics(metrics, date)
  super
  @top_five_percent_average.push(calc_top_five_percent_average(metrics))
  @flog_average.push(metrics[:flog][:average])
end