Class: ConvenientService::Service::Plugins::CanHaveStubbedResults::Commands::FetchAllServicesStubbedResultsCache

Inherits:
ConvenientService::Support::Command show all
Defined in:
lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_all_services_stubbed_results_cache.rb

Instance Method Summary collapse

Methods inherited from ConvenientService::Support::Command

[], call, #initialize

Constructor Details

This class inherits a constructor from ConvenientService::Support::Command

Instance Method Details

#callConvenientService::Support::Cache



24
25
26
27
28
29
30
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_all_services_stubbed_results_cache.rb', line 24

def call
  if Dependencies.rspec.current_example
    Utils::Object.memoize_including_falsy_values(Dependencies.rspec.current_example, :@__convenient_service_stubbed_results__) { Support::Cache.backed_by(:thread_safe_hash).new }
  else
    Support::Cache.backed_by(:thread_safe_hash).new
  end
end