Module: Moped::SessionStore::Base
- Included in:
- Moped::SessionStore
- Defined in:
- lib/moped/session_store/base.rb
Instance Method Summary collapse
- #collection ⇒ Object
-
#initialize(app, options = {}) ⇒ Object
Sets up a new instance of Moped::Session::Store.
Instance Method Details
#collection ⇒ Object
4 5 6 |
# File 'lib/moped/session_store/base.rb', line 4 def collection @collection end |
#initialize(app, options = {}) ⇒ Object
Sets up a new instance of Moped::Session::Store
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/moped/session_store/base.rb', line 9 def initialize(app, = {}) unless [:collection] raise "To avoid creating unneccessary connections to MongoDB" + "this Session Store will only reuse an existing Moped connection" + "this behaviour WILL CHANGE in the future, but not yet" end @collection = [:collection].respond_to?(:call) ? [:collection].call : [:collection] super end |