Class: Hallmonitor::GaugeEvent
- Defined in:
- lib/hallmonitor/gauge_event.rb
Overview
A Gauge event is an event that has a specific value, think of it like a tachometer or gas gauge on a car: at any given point it reports the current value of a variable.
Instance Attribute Summary
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(name, value: nil, tags: {}) ⇒ GaugeEvent
constructor
A new instance of GaugeEvent.
-
#value ⇒ Object
The value of this guage.
-
#value=(new_value) ⇒ Object
Sets the value of this guage.
Methods inherited from Event
Methods included from Monitored
Constructor Details
#initialize(name, value: nil, tags: {}) ⇒ GaugeEvent
Returns a new instance of GaugeEvent.
9 10 11 |
# File 'lib/hallmonitor/gauge_event.rb', line 9 def initialize(name, value: nil, tags: {}) super(name, count: value, tags: ) end |
Instance Method Details
#value ⇒ Object
The value of this guage
14 15 16 |
# File 'lib/hallmonitor/gauge_event.rb', line 14 def value count end |
#value=(new_value) ⇒ Object
Sets the value of this guage
20 21 22 |
# File 'lib/hallmonitor/gauge_event.rb', line 20 def value=(new_value) self.count = new_value end |