Method: Autoscaler::CounterCacheMemory#counter

Defined in:
lib/autoscaler/counter_cache_memory.rb

#counterObject

Current value. Uses the Hash#fetch api - pass a block to use in place of expired values or it will raise an exception.

Raises:



22
23
24
25
26
# File 'lib/autoscaler/counter_cache_memory.rb', line 22

def counter
  return @counter if valid?
  return yield if block_given?
  raise Expired
end