module Roda::RodaPlugins::Hooks::InstanceMethods

def call(&block)

execute the after hooks before returning.
Before routing, execute the before hooks, and
def call(&block)
  res = super do |r|
    if b = opts[:before_hook]
      instance_exec(&b)
    end
    instance_exec(r, &block)
  end
ensure
  if b = opts[:after_hook]
    instance_exec(res, &b)
  end
end