Module: CacheValue::Util

Included in:
CacheMachine, ClassMethods
Defined in:
lib/cache_value/util.rb

Instance Method Summary collapse

Instance Method Details

#caching_method_names(method) ⇒ Object



3
4
5
6
7
8
# File 'lib/cache_value/util.rb', line 3

def caching_method_names(method)
  washed_method = method.to_s.sub(/([?!=])$/, '')
  punctuation = $1
  ["#{washed_method}_without_value_caching#{punctuation}",
   "#{washed_method}_with_value_caching#{punctuation}"]
end