A new Gauge. The block given will be called every time the metric is read.
# File lib/cabin/metrics/gauge.rb, line 9 def initialize(&block) @inspectables = [ ] @block = block end
# File lib/cabin/metrics/gauge.rb, line 21 def to_hash return { :value => value } end
Get the value of this metric.
# File lib/cabin/metrics/gauge.rb, line 16 def value return @block.call end