class ActiveSupport::Callbacks::CallbackSequence

github.com/rails/rails/issues/18011<br>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(&around)

def around(&around)
  CallbackSequence.new do |arg|
    around.call(arg) {
      self.call(arg)
    }
  end
end

def before(&before)

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

def call(arg)

def call(arg)
  @before.each { |b| b.call(arg) }
  value = @call.call(arg)
  @after.each { |a| a.call(arg) }
  value
end

def initialize(&call)

def initialize(&call)
  @call = call
  @before = []
  @after = []
end