Class: MetricFu::FlayGrapher
- Defined in:
- lib/graphs/flay_grapher.rb
Direct Known Subclasses
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
-
#flay_score ⇒ Object
Returns the value of attribute flay_score.
-
#labels ⇒ Object
Returns the value of attribute labels.
Instance Method Summary collapse
- #get_metrics(metrics, date) ⇒ Object
-
#initialize ⇒ FlayGrapher
constructor
A new instance of FlayGrapher.
Methods inherited from Grapher
Methods included from GchartGrapher
Constructor Details
#initialize ⇒ FlayGrapher
Returns a new instance of FlayGrapher.
7 8 9 10 11 |
# File 'lib/graphs/flay_grapher.rb', line 7 def initialize super @flay_score = [] @labels = {} end |
Instance Attribute Details
#flay_score ⇒ Object
Returns the value of attribute flay_score.
5 6 7 |
# File 'lib/graphs/flay_grapher.rb', line 5 def flay_score @flay_score end |
#labels ⇒ Object
Returns the value of attribute labels.
5 6 7 |
# File 'lib/graphs/flay_grapher.rb', line 5 def labels @labels end |
Instance Method Details
#get_metrics(metrics, date) ⇒ Object
13 14 15 16 |
# File 'lib/graphs/flay_grapher.rb', line 13 def get_metrics(metrics, date) @flay_score.push(metrics[:flay][:total_score].to_i) @labels.update( { @labels.size => date }) end |