class ActiveSupport::Callbacks::CallbackSequence
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/active_support/callbacks.rbs class ActiveSupport::Callbacks::CallbackSequence def after: () -> ActiveSupport::Callbacks::CallbackSequence def before: () -> ActiveSupport::Callbacks::CallbackSequence def expand_call_template: (ActiveSupport::Callbacks::Filters::Environment arg, Proc block) -> Array[PageController] def final?: () -> bool def initialize: (?ActiveSupport::Callbacks::CallbackSequence? nested, ?ActiveSupport::Callbacks::CallTemplate::InstanceExec2? call_template, ?Array[]? user_conditions) -> void def invoke_after: (ActiveSupport::Callbacks::Filters::Environment arg) -> Array[] def invoke_before: (ActiveSupport::Callbacks::Filters::Environment arg) -> (nil | Array[] | Array[Proc]) def skip?: (ActiveSupport::Callbacks::Filters::Environment arg) -> false end
:nodoc:
chaining them with nested lambda calls, see:
Execute before and after filters in a sequence instead of
def after(&after)
Experimental RBS support (using type sampling data from the type_fusion
project).
def after: () -> ActiveSupport::Callbacks::CallbackSequence
This signature was generated using 1 sample from 1 application.
def after(&after) @after.push(after) self end
def around(call_template, user_conditions)
def around(call_template, user_conditions) CallbackSequence.new(self, call_template, user_conditions) end
def before(&before)
Experimental RBS support (using type sampling data from the type_fusion
project).
def before: () -> ActiveSupport::Callbacks::CallbackSequence
This signature was generated using 23 samples from 1 application.
def before(&before) @before.unshift(before) self end
def expand_call_template(arg, block)
Experimental RBS support (using type sampling data from the type_fusion
project).
def expand_call_template: (ActiveSupport::Callbacks::Filters::Environment arg, Proc block) -> Proc | Symbol | PageController | Proc
This signature was generated using 3 samples from 1 application.
def expand_call_template(arg, block) @call_template.expand(arg.target, arg.value, block) end
def final?
Experimental RBS support (using type sampling data from the type_fusion
project).
def final?: () -> bool
This signature was generated using 40 samples from 1 application.
def final? !@call_template end
def initialize(nested = nil, call_template = nil, user_conditions = nil)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (?ActiveSupport::Callbacks::CallbackSequence? nested, ?ActiveSupport::Callbacks::CallTemplate::InstanceExec2? call_template, ?[]? user_conditions) -> void
This signature was generated using 6 samples from 1 application.
https://github.com/rails/rails/issues/18011
chaining them with nested lambda calls, see:
Execute before and after filters in a sequence instead of
def initialize(nested = nil, call_template = nil, user_conditions = nil) @nested = nested @call_template = call_template @user_conditions = user_conditions @before = [] @after = [] end
def invoke_after(arg)
Experimental RBS support (using type sampling data from the type_fusion
project).
def invoke_after: (ActiveSupport::Callbacks::Filters::Environment arg) ->
This signature was generated using 52 samples from 1 application.
def invoke_after(arg) @after.each { |a| a.call(arg) } end
def invoke_before(arg)
Experimental RBS support (using type sampling data from the type_fusion
project).
def invoke_before: (ActiveSupport::Callbacks::Filters::Environment arg) -> (nil | | Proc | Proc | Proc | Proc | Proc | Proc)
This signature was generated using 46 samples from 1 application.
def invoke_before(arg) @before.each { |b| b.call(arg) } end
def skip?(arg)
Experimental RBS support (using type sampling data from the type_fusion
project).
def skip?: (ActiveSupport::Callbacks::Filters::Environment arg) -> false
This signature was generated using 4 samples from 1 application.
def skip?(arg) arg.halted || !@user_conditions.all? { |c| c.call(arg.target, arg.value) } end