Class: FancyCount::RedisAdapter

Inherits:
Adapter
  • Object
show all
Defined in:
lib/fancy_count/redis_adapter.rb

Instance Method Summary collapse

Methods inherited from Adapter

#change, #decrement, #delete, #increment, #initialize, #reset, #value

Constructor Details

This class inherits a constructor from FancyCount::Adapter

Instance Method Details

#counterObject



5
6
7
8
9
10
11
# File 'lib/fancy_count/redis_adapter.rb', line 5

def counter
  options = {}
  if @config.expireat
    options[:expireat] = @config.expireat
  end
  @counter ||= Redis::Counter.new(@name, options)
end