Method: Mongoid::Threaded#sessions

Defined in:
lib/mongoid/threaded.rb

#sessionsHash<Integer, Set>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the thread store of sessions.

Returns:

  • (Hash<Integer, Set>)

    The sessions indexed by client object ID.



489
490
491
# File 'lib/mongoid/threaded.rb', line 489

def sessions
  get(SESSIONS_KEY) { {}.compare_by_identity }
end