Class: Mack::SessionStore::Test

Inherits:
Base show all
Defined in:
lib/mack/sessions/test_session_store.rb

Overview

A simple Hash based session store for testing.

Class Method Summary collapse

Class Method Details

.direct_set(id, session) ⇒ Object

:nodoc:



17
18
19
# File 'lib/mack/sessions/test_session_store.rb', line 17

def direct_set(id, session) # :nodoc:
  store[id] = session
end

.expire(id, *args) ⇒ Object

:nodoc:



21
22
23
# File 'lib/mack/sessions/test_session_store.rb', line 21

def expire(id, *args) # :nodoc:
  store.delete(id)
end

.expire_allObject

:nodoc:



25
26
27
# File 'lib/mack/sessions/test_session_store.rb', line 25

def expire_all # :nodoc:
  @store = {}
end

.get(id, *args) ⇒ Object

:nodoc:



9
10
11
# File 'lib/mack/sessions/test_session_store.rb', line 9

def get(id, *args) # :nodoc:
  store[id]
end

.set(id, request, *args) ⇒ Object

:nodoc:



13
14
15
# File 'lib/mack/sessions/test_session_store.rb', line 13

def set(id, request, *args) # :nodoc:
  store[id] = request.session
end