lib/prometheus/client/summary.rb in prometheus-client-0.3.0 vs lib/prometheus/client/summary.rb in prometheus-client-0.3.1
- old
+ new
@@ -13,14 +13,12 @@
attr_accessor :sum, :total
def initialize(estimator)
@sum, @total = estimator.sum, estimator.observations
- values = estimator.invariants.each_with_object({}) do |i, memo|
- memo[i.quantile] = estimator.query(i.quantile)
+ estimator.invariants.each do |invariant|
+ self[invariant.quantile] = estimator.query(invariant.quantile)
end
-
- replace(values)
end
end
def type
:summary