module ActiveSupport::Callbacks::CallTemplate
def self.build(filter, callback)
All of these objects are converted into a CallTemplate and handled
Objects:: An object with a before_foo method on it to call.
Procs:: A proc to call with the object.
Symbols:: A method to call.
Filters support:
def self.build(filter, callback) case filter when Symbol MethodCall.new(filter) when Conditionals::Value ProcCall.new(filter) when ::Proc case filter.arity when 2 InstanceExec2.new(filter) when 1, -2 InstanceExec1.new(filter) else InstanceExec0.new(filter) end else ObjectCall.new(filter, callback.current_scopes.join("_").to_sym) end end