Class: SocialAvatarProxy::Configuration::Caches

Inherits:
Array
  • Object
show all
Defined in:
lib/social_avatar_proxy/configuration/caches.rb

Instance Method Summary collapse

Instance Method Details

#fetch(*args, &block) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/social_avatar_proxy/configuration/caches.rb', line 4

def fetch(*args, &block)
  if cache = delete_at(0)
    cache.fetch(*args) do
      fetch(*args, &block)
    end
  else
    block.yield
  end
end