Sha256: c6b189f424ffa2c70446edd260d09222df0c06a113d3ffcc7cf14332c7acf8d9

Contents?: true

Size: 766 Bytes

Versions: 4

Compression:

Stored size: 766 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Support
    class Cache
      module Exceptions
        class NotSupportedBackend < ::ConvenientService::Exception
          ##
          # @param backend [Symbol]
          # @return [void]
          #
          def initialize_with_kwargs(backend:)
            message = <<~TEXT
              Backend `#{backend}` is NOT supported.

              Supported backends are #{printable_backends}.
            TEXT

            initialize(message)
          end

          private

          ##
          # @return [String]
          #
          def printable_backends
            Constants::Backends::ALL.map { |backend| "`:#{backend}`" }.join(", ")
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/support/cache/exceptions.rb
convenient_service-0.19.0 lib/convenient_service/support/cache/exceptions.rb
convenient_service-0.18.0 lib/convenient_service/support/cache/exceptions.rb
convenient_service-0.17.0 lib/convenient_service/support/cache/exceptions.rb