Sha256: 35001f7e40b1e6779e0658ace7210633a54cd822f032c56ff09a722bd8671cf0
Contents?: true
Size: 833 Bytes
Versions: 4
Compression:
Stored size: 833 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 raise Exceptions::NotSupportedBackend.new(backend: backend) end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems