Module: ActionTracer::MonkeyPatches::ActiveSupport::Callbacks::CallTemplate

Defined in:
lib/action_tracer/monkey_patches/active_support/callbacks.rb

Defined Under Namespace

Modules: InstanceExec, MethodCall, ProcCall

Instance Method Summary collapse

Instance Method Details

#expandObject



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/action_tracer/monkey_patches/active_support/callbacks.rb', line 51

def expand(*)
  target, block, method, *arguments = super
  if target.is_a? ActionController::Base
    case method
    when :instance_exec # filter is a proc
      ActionTracer.applied_filters << block
    when String         # filter is an object
      ActionTracer.applied_filters << block
    when Symbol         # filter is a method
      ActionTracer.applied_filters << method
    end
  end

  [target, block, method, *arguments]
end