module Roda::RodaPlugins::ClassLevelRouting::InstanceMethods
def call
If the normal routing tree doesn't handle an action, try each class level route
def call result = super if result[0] == 404 && (v = result[2]).is_a?(Array) && v.empty? # Reset the response so it doesn't inherit the status or any headers from # the original response. @_response = self.class::RodaResponse.new super do |r| opts[:class_level_routes].each do |meth, args, blk| r.send(meth, *args) do |*a| instance_exec(*a, &blk) end end end else result end end