Module: Split::Persistence

Defined in:
lib/split/persistence.rb,
lib/split/persistence/redis_adapter.rb,
lib/split/persistence/cookie_adapter.rb,
lib/split/persistence/session_adapter.rb

Defined Under Namespace

Classes: CookieAdapter, RedisAdapter, SessionAdapter

Constant Summary collapse

ADAPTERS =
{
  :cookie => Split::Persistence::CookieAdapter,
  :session => Split::Persistence::SessionAdapter
}.freeze

Class Method Summary collapse

Class Method Details

.adapterObject


13
14
15
16
17
18
19
# File 'lib/split/persistence.rb', line 13

def self.adapter
  if persistence_config.is_a?(Symbol)
    ADAPTERS.fetch(persistence_config) { raise Split::InvalidPersistenceAdapterError }
  else
    persistence_config
  end
end