lib/resque/worker.rb
def run_hook(name, *args)
      return unless hooks = Resque.send(name)
      msg = "Running #{name} hooks"
      msg << " with #{args.inspect}" if args.any?
      Resque.logger.info msg

      hooks.each do |hook|
        args.any? ? hook.call(*args) : hook.call
      end
    end
# Runs a named hook, passing along any arguments.
Runs a named hook, passing along any arguments.
Runs a named hook passing along any arguments .
def run_hook(name, *args)
      return unless hooks = Resque.send(name)
      msg = "Running #{name} hooks"
      msg << " with #{args.inspect}" if args.any?
      Resque.logger.info msg
      hooks.each do |hook|
        args.any? ? hook.call(*args) : hook.call
      end
    end
def run_hook ( name , * args ) return unless hooks = Resque . send ( name ) msg = "Running #{name} hooks" msg << " with #{args.inspect}" if args . any? Resque . logger . info msg hooks . each do | hook | args . any? ? hook . call ( * args ) : hook . call end end
Runs a named hook, passing along any arguments.
Runs a named hook passing along any arguments .
name
args