Class: Colloquy::SessionStore
- Inherits:
-
Object
- Object
- Colloquy::SessionStore
- Defined in:
- lib/colloquy/session_store.rb
Defined Under Namespace
Constant Summary collapse
- KEY_PREFIX =
'ussd_renderer:'
Class Method Summary collapse
-
.haystack(type = :memory, options = {}) ⇒ Colloquy::SessionStore::Memory Colloquy::SessionStore::Redis
Returns a Memory store object according to the type of memory.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SessionStore
constructor
A new instance of SessionStore.
Constructor Details
#initialize(options = {}) ⇒ SessionStore
Returns a new instance of SessionStore.
22 23 24 |
# File 'lib/colloquy/session_store.rb', line 22 def initialize( = {}) @identifier = [:identifier] || :sessions end |
Class Method Details
.haystack(type = :memory, options = {}) ⇒ Colloquy::SessionStore::Memory Colloquy::SessionStore::Redis
Returns a Memory store object according to the type of memory.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/colloquy/session_store.rb', line 8 def haystack(type = :memory, = {}) case type.to_sym when :memory require_relative 'session_store/memory' Colloquy::SessionStore::Memory.new() else :redis require_relative 'session_store/redis' Colloquy::SessionStore::Redis.new() end end |