Sha256: 7ed8dbe2a7ae700783ce60bef71ffb30da37abe85be4cf73a2c6b915824f46aa

Contents?: true

Size: 682 Bytes

Versions: 7

Compression:

Stored size: 682 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Support
    module DependencyContainer
      module Commands
        class AssertValidScope < Support::Command
          ##
          # @!attribute [r] scope
          #   @return [Object]
          #
          attr_reader :scope

          ##
          # @param scope [Object]
          # @return [void]
          #
          def initialize(scope:)
            @scope = scope
          end

          ##
          # @return [Module]
          #
          def call
            raise Errors::InvalidScope.new(scope: scope) unless Constants::SCOPES.include?(scope)
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
convenient_service-0.11.0 lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb
convenient_service-0.10.1 lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb
convenient_service-0.10.0 lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb
convenient_service-0.9.0 lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb
convenient_service-0.8.0 lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb
convenient_service-0.7.0 lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb
convenient_service-0.6.0 lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb