Sha256: 3f97c4b8f0c1a5e3b864dd929c2b28da88534c77ce463c5671e46d5c51deca56

Contents?: true

Size: 1011 Bytes

Versions: 8

Compression:

Stored size: 1011 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module CanHaveStubbedResults
        module Commands
          class FetchServiceStubbedResultsCache < Support::Command
            ##
            # @!attribute [r] service
            #   @return [ConvenientService::Service]
            #
            attr_reader :service

            ##
            # @param service [ConvenientService::Service]
            # @return [void]
            #
            def initialize(service:)
              @service = service
            end

            ##
            # @return [ConvenientService::Support::Cache]
            #
            def call
              cache.scope(service)
            end

            private

            ##
            # @return [ConvenientService::Support::Cache]
            #
            def cache
              @cache ||= Commands::FetchAllServicesStubbedResultsCache.call
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_service_stubbed_results_cache.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_service_stubbed_results_cache.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_service_stubbed_results_cache.rb
convenient_service-0.17.0 lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_service_stubbed_results_cache.rb
convenient_service-0.16.0 lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_service_stubbed_results_cache.rb
convenient_service-0.15.0 lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_service_stubbed_results_cache.rb
convenient_service-0.14.0 lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_service_stubbed_results_cache.rb
convenient_service-0.13.0 lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_service_stubbed_results_cache.rb