module ActiveSupport::Callbacks::CallTemplate
def self.build(filter, callback)
Experimental RBS support (using type sampling data from the type_fusion
project).
def self.build: ((Proc | Symbol) filter, ActiveSupport::Callbacks::Callback callback) -> (ActiveSupport::Callbacks::CallTemplate::InstanceExec0 | ActiveSupport::Callbacks::CallTemplate::MethodCall)
This signature was generated using 2 samples from 2 applications.
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 if filter.arity > 1 InstanceExec2.new(filter) elsif filter.arity > 0 InstanceExec1.new(filter) else InstanceExec0.new(filter) end else ObjectCall.new(filter, callback.current_scopes.join("_").to_sym) end end