Class: ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Commands::FetchAllFeaturesStubbedEntriesCache

Inherits:
Support::Command
  • Object
show all
Defined in:
lib/convenient_service/feature/plugins/can_have_stubbed_entries/commands/fetch_all_features_stubbed_entries_cache.rb

Instance Method Summary collapse

Methods inherited from Support::Command

[], call, #initialize

Constructor Details

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

Instance Method Details

#callConvenientService::Support::Cache



23
24
25
26
27
28
29
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/commands/fetch_all_features_stubbed_entries_cache.rb', line 23

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