Class: PulseMeter::Sensor::UniqCounter

Inherits:
Counter show all
Defined in:
lib/pulse-meter/sensor/uniq_counter.rb

Constant Summary

Constants included from Mixins::Dumper

Mixins::Dumper::DUMP_REDIS_KEY

Instance Attribute Summary

Attributes inherited from Base

#name, #redis

Instance Method Summary collapse

Methods inherited from Counter

#cleanup, #incr, #value_key

Methods inherited from Base

#annotate, #annotation, #cleanup, #command_aggregator, #event, #initialize

Methods included from Mixins::Dumper

included

Constructor Details

This class inherits a constructor from PulseMeter::Sensor::Base

Instance Method Details

#valueFixnum

Returs number of unique values ever sent to counter

Returns:

  • (Fixnum)


10
11
12
# File 'lib/pulse-meter/sensor/uniq_counter.rb', line 10

def value
  redis.scard(value_key)
end