Sha256: 51f0ad1c01121499fca6117445bdcc86d5e6fcc7d90c4700ec24257b595048e6
Contents?: true
Size: 647 Bytes
Versions: 10
Compression:
Stored size: 647 Bytes
Contents
%w[session_adapter cookie_adapter redis_adapter].each do |f| require "split/persistence/#{f}" end module Split module Persistence ADAPTERS = { :cookie => Split::Persistence::CookieAdapter, :session => Split::Persistence::SessionAdapter } def self.adapter if persistence_config.is_a?(Symbol) adapter_class = ADAPTERS[persistence_config] raise Split::InvalidPersistenceAdapterError unless adapter_class else adapter_class = persistence_config end adapter_class end private def self.persistence_config Split.configuration.persistence end end end
Version data entries
10 entries across 10 versions & 1 rubygems