Class: Garner::Strategies::Binding::Key::CacheKey

Inherits:
Base
  • Object
show all
Defined in:
lib/garner/strategies/binding/key/cache_key.rb

Class Method Summary collapse

Class Method Details

.apply(binding) ⇒ String

Compute a cache key from an object binding.

Parameters:

  • binding (Object)

    The object from which to compute a key.

Returns:

  • (String)

    A cache key string.



10
11
12
# File 'lib/garner/strategies/binding/key/cache_key.rb', line 10

def self.apply(binding)
  binding.cache_key if binding.respond_to?(:cache_key)
end