Module: Split::Persistence

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

Defined Under Namespace

Classes: CookieAdapter, DualAdapter, RedisAdapter, SessionAdapter

Constant Summary collapse

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

Class Method Summary collapse

Class Method Details

.adapterObject



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

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