Sha256: e90881dd772542a990ca5ca7d147b064ff007fb38b622fbae080c55e43e009b9
Contents?: true
Size: 338 Bytes
Versions: 3
Compression:
Stored size: 338 Bytes
Contents
module Metrics module Instruments class Gauge < Base def initialize(&block) raise ArgumentError, "a block is required" unless block_given? @block = block end def get instance_exec(&@block) end def to_s get.to_json end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby-metrics-0.7.0 | lib/ruby-metrics/instruments/gauge.rb |
ruby-metrics-0.6.0 | lib/ruby-metrics/instruments/gauge.rb |
ruby-metrics-0.5.0 | lib/ruby-metrics/instruments/gauge.rb |