Class: Leafy::Metrics::Registry::GaugeWrapper

Inherits:
Gauge
  • Object
show all
Defined in:
lib/leafy/metrics/registry.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ GaugeWrapper

Returns a new instance of GaugeWrapper.



31
32
33
# File 'lib/leafy/metrics/registry.rb', line 31

def initialize( block )
  @block = block
end

Instance Method Details

#valueObject



35
36
37
# File 'lib/leafy/metrics/registry.rb', line 35

def value
  @block.call
end