Class: Multimeter::ProcGauge

Inherits:
Yammer::Metrics::Gauge show all
Defined in:
lib/multimeter.rb

Instance Method Summary collapse

Methods inherited from Yammer::Metrics::Gauge

#to_h, #type

Constructor Details

#initialize(proc) ⇒ ProcGauge

Returns a new instance of ProcGauge.



570
571
572
573
# File 'lib/multimeter.rb', line 570

def initialize(proc)
  super()
  @proc = proc
end

Instance Method Details

#same?(other_proc) ⇒ Boolean

Returns:

  • (Boolean)


579
580
581
# File 'lib/multimeter.rb', line 579

def same?(other_proc)
  other_proc.source_location == @proc.source_location
end

#valueObject



575
576
577
# File 'lib/multimeter.rb', line 575

def value
  @proc.call
end