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
split-1.4.3 lib/split/persistence/session_adapter.rb
split-1.4.2 lib/split/persistence/session_adapter.rb
split-1.4.1 lib/split/persistence/session_adapter.rb
split-1.4.0 lib/split/persistence/session_adapter.rb