Module: Mongoid::Clients::Options::Threaded
- Included in:
- ClassMethods, Proxy
- Defined in:
- lib/mongoid/clients/options.rb
Instance Method Summary collapse
-
#client_with_options(klass = self) ⇒ Mongo::Client
Get the client with special options for the current thread.
-
#persistence_options(klass = self) ⇒ Hash
Get the persistence options for the current thread.
Instance Method Details
#client_with_options(klass = self) ⇒ Mongo::Client
Get the client with special options for the current thread.
90 91 92 |
# File 'lib/mongoid/clients/options.rb', line 90 def (klass = self) Thread.current["[mongoid][#{klass}]:mongo-client"] end |
#persistence_options(klass = self) ⇒ Hash
Get the persistence options for the current thread.
76 77 78 |
# File 'lib/mongoid/clients/options.rb', line 76 def (klass = self) Thread.current["[mongoid][#{klass}]:persistence-options"] end |