lib/mongoid/interceptable.rb
def run_before_callbacks(*kinds)
      kinds.each do |kind|
        run_targeted_callbacks(:before, kind)
      end
    end
# Run only the before callbacks for the specific event.
#
# @note ActiveSupport does not allow this type of behaviour by default, so
#   Mongoid has to get around it and implement itself.
#
# @example Run only the before save callbacks.
#   model.run_before_callbacks(:save, :create)
#
# @param [ Array<Symbol> ] kinds The events that are occurring.
#
# @return [ Object ] The result of the chain executing.
#
# @since 3.0.0
Run only the before callbacks for the specific event.
Run only the before callbacks for the specific event .
def run_before_callbacks(*kinds)
      kinds.each do |kind|
        run_targeted_callbacks(:before, kind)
      end
    end
def run_before_callbacks ( * kinds ) kinds . each do | kind | run_targeted_callbacks ( :before , kind ) end end
Run only the before callbacks for the specific event.
Run only the before callbacks for the specific event .
The result of the chain executing.
The result of the chain executing .
 Object 
kinds
kinds The events that are occurring.
kinds The events that are occurring .
note
ActiveSupport does not allow this type of behaviour by default, so Mongoid has to get around it and implement itself.
ActiveSupport does not allow this type of behaviour by default so Mongoid has to get around it and implement itself .
example
Run only the before save callbacks. model.run_before_callbacks(:save, :create)
Run only the before save callbacks . model . run_before_callbacks ( : save : create )
since
None