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
5 6 7 8 9 10 |
# File 'lib/cache_value/util.rb', line 5 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 |
#hex_digest(values) ⇒ Object
12 13 14 |
# File 'lib/cache_value/util.rb', line 12 def hex_digest(values) Digest::SHA1.hexdigest(stringify_value(values)) end |