Permalink
Browse files

Metric values should be float in order to handle percentage values

  • Loading branch information...
1 parent 09dd828 commit 7362a4001f69f19a058be48263623b37914e7c1b @DTrierweiler DTrierweiler committed May 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/gattica/data_point.rb
@@ -20,7 +20,7 @@ def initialize(xml)
{ dimension.attributes['name'].split(':').last.to_sym => dimension.attributes['value'].split(':').last }
end
@metrics = xml.search('dxp:metric').collect do |metric|
- { metric.attributes['name'].split(':').last.to_sym => metric.attributes['value'].split(':').last.to_i }
+ { metric.attributes['name'].split(':').last.to_sym => metric.attributes['value'].split(':').last.to_f }
end
end

0 comments on commit 7362a40

Please sign in to comment.