Class/Module Index [+]

Quicksearch

Mongoid::Threaded::Lifecycle::ClassMethods

Public Instance Methods

_creating() click to toggle source

Execute a block in creating mode.

@example Execute in creating mode.

creating do
  relation.push(doc)
end

@return [ Object ] The return value of the block.

@since 2.1.0

# File lib/mongoid/threaded/lifecycle.rb, line 170
def _creating
  Threaded.begin_execution("create")
  yield
ensure
  Threaded.exit_execution("create")
end
_loading_revision?() click to toggle source

Is the current thread in loading revision mode?

@example Is the current thread in loading revision mode?

proxy._loading_revision?

@return [ true, false ] If the thread is loading a revision.

@since 2.3.4

# File lib/mongoid/threaded/lifecycle.rb, line 185
def _loading_revision?
  Threaded.executing?("load_revision")
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.