module Bibliothecary::Analyser::TryCache

Public Instance Methods

try_cache(options, key) { || ... } click to toggle source
# File lib/bibliothecary/analyser.rb, line 39
def try_cache(options, key)
  if options[:cache]
    options[:cache][key] ||= yield

    options[:cache][key]
  else
    yield
  end
end