Sha256: bcdb237bd1cd0db15389d54d85950c09f6b915e9066f215d1d00ed00c1d99511
Contents?: true
Size: 853 Bytes
Versions: 4
Compression:
Stored size: 853 Bytes
Contents
# frozen_string_literal: true require_relative "cache/constants" require_relative "cache/entities" require_relative "cache/exceptions" module ConvenientService module Support class Cache class << self ## # @param backend [Symbol] # @return [ConvenientService::Support::Cache::Entities::Caches::Base] # def create(backend: Constants::Backends::HASH) case backend when Constants::Backends::ARRAY Entities::Caches::Array.new when Constants::Backends::HASH Entities::Caches::Hash.new when Constants::Backends::THREAD_SAFE_ARRAY Entities::Caches::ThreadSafeArray.new else ::ConvenientService.raise Exceptions::NotSupportedBackend.new(backend: backend) end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems