lib/graphs/flay_grapher.rb in metric_fu-1.5.0 vs lib/graphs/flay_grapher.rb in metric_fu-1.5.1
- old
+ new
@@ -1,20 +1,18 @@
module MetricFu
-
class FlayGrapher < Grapher
-
attr_accessor :flay_score, :labels
-
+
def initialize
super
@flay_score = []
@labels = {}
end
-
+
def get_metrics(metrics, date)
- @flay_score.push(metrics[:flay][:total_score].to_i)
- @labels.update( { @labels.size => date })
+ if metrics && metrics[:flay]
+ @flay_score.push(metrics[:flay][:total_score].to_i)
+ @labels.update( { @labels.size => date })
+ end
end
-
end
-
end