Module: MongoSessions::MongoStore
- Included in:
- ActionDispatch::Session::MongoStore
- Defined in:
- lib/mongo_session_gaggle/mongo.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
Instance Method Summary collapse
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
20 21 22 |
# File 'lib/mongo_session_gaggle/mongo.rb', line 20 def collection @collection end |
Instance Method Details
#initialize(app, options = {}) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/mongo_session_gaggle/mongo.rb', line 22 def initialize(app, = {}) unless [:collection] raise 'Collection is a required option via :collection. This gem does not connect to MongoDB itself. You have to ' << 'handle that for it. Peace.' end @collection = [:collection].respond_to?(:call) ? [:collection].call : [:collection] super end |