module ActiveSupport::Callbacks::CallTemplate
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/active_support/callbacks.rbs module ActiveSupport::Callbacks::CallTemplate type ActiveSupport__Callbacks__CallTemplate_build_filter = Proc | ActiveSupport::ExecutionWrapper::RunHook | ActiveSupport::ExecutionWrapper::CompleteHook | Symbol def self.build: (ActiveSupport__Callbacks__CallTemplate_build_filter filter, ActiveSupport::Callbacks::Callback callback) -> (ActiveSupport::Callbacks::CallTemplate::InstanceExec0 | ActiveSupport::Callbacks::CallTemplate::ObjectCall | ActiveSupport::Callbacks::CallTemplate::MethodCall) end
def self.build(filter, callback)
Experimental RBS support (using type sampling data from the type_fusion
project).
type ActiveSupport__Callbacks__CallTemplate_build_filter = Proc | ActiveSupport::ExecutionWrapper::RunHook | ActiveSupport::ExecutionWrapper::CompleteHook | Symbol def self.build: (ActiveSupport__Callbacks__CallTemplate_build_filter filter, ActiveSupport::Callbacks::Callback callback) -> (ActiveSupport::Callbacks::CallTemplate::InstanceExec0 | ActiveSupport::Callbacks::CallTemplate::ObjectCall | ActiveSupport::Callbacks::CallTemplate::MethodCall)
This signature was generated using 24 samples from 1 application.
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