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



18
19
20
21
22
23
24
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_all_services_stubbed_results_cache.rb', line 18

def call
  if Dependencies.rspec.current_example
    Utils::Object.memoize_including_falsy_values(Dependencies.rspec.current_example, :@__convenient_service_stubbed_results__) { Support::Cache.create(backend: :thread_safe_array) }
  else
    Support::Cache.create(backend: :thread_safe_array)
  end
end