Sha256: a9f1e6e4b44bcedd44111ea457f791a9446f8cc52ef56772a0b9283ba7aded50

Contents?: true

Size: 445 Bytes

Versions: 20

Compression:

Stored size: 445 Bytes

Contents

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

20 entries across 20 versions & 1 rubygems

Version Path
split-1.3.2 lib/split/persistence/session_adapter.rb
split-1.3.1 lib/split/persistence/session_adapter.rb
split-1.3.0 lib/split/persistence/session_adapter.rb
split-1.2.1 lib/split/persistence/session_adapter.rb
split-1.2.0 lib/split/persistence/session_adapter.rb
split-1.1.0 lib/split/persistence/session_adapter.rb
split-1.0.0 lib/split/persistence/session_adapter.rb
split-0.8.0 lib/split/persistence/session_adapter.rb
split-0.7.3 lib/split/persistence/session_adapter.rb
split-0.7.2 lib/split/persistence/session_adapter.rb
split-0.7.1 lib/split/persistence/session_adapter.rb
split-0.7.0 lib/split/persistence/session_adapter.rb
split-0.6.6 lib/split/persistence/session_adapter.rb
split-0.6.5 lib/split/persistence/session_adapter.rb
split-0.6.4 lib/split/persistence/session_adapter.rb
split-0.6.3 lib/split/persistence/session_adapter.rb
split-0.6.2 lib/split/persistence/session_adapter.rb
split-0.6.1 lib/split/persistence/session_adapter.rb
split-0.6.0 lib/split/persistence/session_adapter.rb
split-0.5.0 lib/split/persistence/session_adapter.rb