class ActiveSupport::Callbacks::CallbackSequence

:nodoc:
chaining them with nested lambda calls, see:
Execute before and after filters in a sequence instead of

def after(&after)

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)

def before(&before)
  @before.unshift(before)
  self
end

def expand_call_template(arg, block)

def expand_call_template(arg, block)
  @call_template.expand(arg.target, arg.value, block)
end

def final?

def final?
  !@call_template
end

def initialize(nested = nil, call_template = nil, user_conditions = nil)

:nodoc:
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)

def invoke_after(arg)
  @after.each { |a| a.call(arg) }
end

def invoke_before(arg)

def invoke_before(arg)
  @before.each { |b| b.call(arg) }
end

def skip?(arg)

def skip?(arg)
  arg.halted || !@user_conditions.all? { |c| c.call(arg.target, arg.value) }
end