Class: Multimeter::ProcGauge
- Inherits:
-
Yammer::Metrics::Gauge
- Object
- Yammer::Metrics::Gauge
- Multimeter::ProcGauge
- Defined in:
- lib/multimeter.rb
Instance Method Summary collapse
-
#initialize(proc) ⇒ ProcGauge
constructor
A new instance of ProcGauge.
- #same?(other_proc) ⇒ Boolean
- #value ⇒ Object
Methods inherited from Yammer::Metrics::Gauge
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
579 580 581 |
# File 'lib/multimeter.rb', line 579 def same?(other_proc) other_proc.source_location == @proc.source_location end |
#value ⇒ Object
575 576 577 |
# File 'lib/multimeter.rb', line 575 def value @proc.call end |