class Sinatra::Base
def filter!(type, base = settings, &block)
Run filters defined on the class and all superclasses.
def filter!(type, base = settings, &block) filter!(type, base.superclass, &block) if base.superclass.respond_to?(:filters) base.filters[type].each do |args| result = process_route(*args) block.call(result) if block_given? end end