Class: ConvenientService::Service::Plugins::CanHaveStubbedResults::Commands::FetchAllServicesStubbedResultsCache Private
- Inherits:
-
ConvenientService::Support::Command
- Object
- ConvenientService::Support::Command
- ConvenientService::Service::Plugins::CanHaveStubbedResults::Commands::FetchAllServicesStubbedResultsCache
- Defined in:
- lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_all_services_stubbed_results_cache.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #service ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ ConvenientService::Support::Cache private
- #initialize(service:) ⇒ void constructor private
Methods inherited from ConvenientService::Support::Command
Constructor Details
#initialize(service:) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_all_services_stubbed_results_cache.rb', line 24 def initialize(service:) @service = service end |
Instance Attribute Details
#service ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_all_services_stubbed_results_cache.rb', line 18 def service @service end |
Instance Method Details
#call ⇒ ConvenientService::Support::Cache
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 34 35 36 37 |
# File 'lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_all_services_stubbed_results_cache.rb', line 31 def call if service.stubbed_results_store Utils::Object.memoize_including_falsy_values(service.stubbed_results_store, :@__convenient_service_stubbed_results__) { Support::Cache.backed_by(:thread_safe_hash).new } else Support::Cache.backed_by(:thread_safe_hash).new end end |