Module: Mongoid::Threaded::Lifecycle::ClassMethods
- Defined in:
- lib/mongoid/threaded/lifecycle.rb
Instance Method Summary collapse
-
#_creating ⇒ Object
Execute a block in creating mode.
-
#_loading_revision? ⇒ true, false
Is the current thread in loading revision mode?.
Instance Method Details
#_creating ⇒ Object
Execute a block in creating mode.
171 172 173 174 175 176 |
# File 'lib/mongoid/threaded/lifecycle.rb', line 171 def _creating Threaded.begin_execution("create") yield ensure Threaded.exit_execution("create") end |
#_loading_revision? ⇒ true, false
Is the current thread in loading revision mode?
186 187 188 |
# File 'lib/mongoid/threaded/lifecycle.rb', line 186 def _loading_revision? Threaded.executing?("load_revision") end |