Class: PulseMeter::Sensor::HashedIndicator
- Defined in:
- lib/pulse-meter/sensor/hashed_indicator.rb
Overview
Static hashed indicator. In fact is is just a named hash with float value
Constant Summary
Constants included from Mixins::Dumper
Mixins::Dumper::DUMP_REDIS_KEY
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#value ⇒ Fixnum
Get indicator values.
Methods inherited from Indicator
Methods inherited from Base
#annotate, #annotation, #cleanup, #command_aggregator, #event, #initialize
Methods included from Mixins::Dumper
Constructor Details
This class inherits a constructor from PulseMeter::Sensor::Base
Instance Method Details
#value ⇒ Fixnum
Get indicator values
8 9 10 11 12 |
# File 'lib/pulse-meter/sensor/hashed_indicator.rb', line 8 def value redis. hgetall(value_key). inject(Hash.new(0)) {|h, (k, v)| h[k] = v.to_f; h} end |