Sha256: 20787b60d5f6c56d9761e28a6bbe70711009e3413973d82b13f9ce14e87dec5f
Contents?: true
Size: 488 Bytes
Versions: 24
Compression:
Stored size: 488 Bytes
Contents
require "cabin/namespace" require "cabin/metric" class Cabin::Metrics::Gauge include Cabin::Metric # A new Gauge. The block given will be called every time the metric is read. public def initialize(&block) @inspectables = [ ] @block = block end # def initialize # Get the value of this metric. public def value return @block.call end # def value public def to_hash return { :value => value } end # def to_hash end # class Cabin::Metrics::Gauge
Version data entries
24 entries across 22 versions & 6 rubygems