Sha256: 46e216d32ceaf7670277666c87740dccf5654be4d7862ee19ee5a17888c4e33a

Contents?: true

Size: 476 Bytes

Versions: 24

Compression:

Stored size: 476 Bytes

Contents

# frozen_string_literal: true
module Split
  module Persistence
    class SessionAdapter

      def initialize(context)
        @session = context.session
        @session[:split] ||= {}
      end

      def [](key)
        @session[:split][key]
      end

      def []=(key, value)
        @session[:split][key] = value
      end

      def delete(key)
        @session[:split].delete(key)
      end

      def keys
        @session[:split].keys
      end

    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
ab-split-1.0.2 lib/split/persistence/session_adapter.rb
ab-split-1.0.1 lib/split/persistence/session_adapter.rb
ab-split-1.0.0 lib/split/persistence/session_adapter.rb
split-3.4.1 lib/split/persistence/session_adapter.rb
split-3.4.0 lib/split/persistence/session_adapter.rb
split-3.3.2 lib/split/persistence/session_adapter.rb
split-3.3.1 lib/split/persistence/session_adapter.rb
split-3.3.0 lib/split/persistence/session_adapter.rb
split-3.2.0 lib/split/persistence/session_adapter.rb
split-3.1.1 lib/split/persistence/session_adapter.rb
split-3.1.0 lib/split/persistence/session_adapter.rb
split-3.0.0 lib/split/persistence/session_adapter.rb
split-2.2.0 lib/split/persistence/session_adapter.rb
split-2.1.0 lib/split/persistence/session_adapter.rb
split-2.0.0 lib/split/persistence/session_adapter.rb
split-1.7.0 lib/split/persistence/session_adapter.rb
split-1.6.0 lib/split/persistence/session_adapter.rb
split-1.5.0 lib/split/persistence/session_adapter.rb
split-1.4.5 lib/split/persistence/session_adapter.rb
split-1.4.4 lib/split/persistence/session_adapter.rb