lib/roda/plugins/class_level_routing.rb
def _roda_after_10__class_level_routing(result)
          if result && 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.send(:initialize)
            @_response.status = nil
            result.replace(_roda_handle_route do
              r = @_request
              opts[:class_level_routes].each do |request_meth, args, meth|
                r.instance_variable_set(:@remaining_path, @_original_remaining_path)
                r.public_send(request_meth, *args) do |*a|
                  send(meth, *a)
                end
              end
              nil
            end)
          end
        end
# If the normal routing tree doesn't handle an action, try each class level route
# to see if it matches.
If the normal routing tree doesn't handle an action, try each class level route
to see if it matches.
If the normal routing tree doesn ' t handle an action try each class level route to see if it matches .
def _roda_after_10__class_level_routing(result)
          if result && result[0] == 404 && (v = result[2]).is_a?(Array) && v.empty?
            @_response.send(:initialize)
            @_response.status = nil
            result.replace(_roda_handle_route do
              r = @_request
              opts[:class_level_routes].each do |request_meth, args, meth|
                r.instance_variable_set(:@remaining_path, @_original_remaining_path)
                r.public_send(request_meth, *args) do |*a|
                  send(meth, *a)
                end
              end
              nil
            end)
          end
        end
def _roda_after_10__class_level_routing ( result ) if result && result [ 0 ] == 404 && ( v = result [ 2 ] ) . is_a? ( Array ) && v . empty? @_response . send ( :initialize ) @_response . status = nil result . replace ( _roda_handle_route do r = @_request opts [ :class_level_routes ] . each do | request_meth , args , meth | r . instance_variable_set ( :@remaining_path , @_original_remaining_path ) r . public_send ( request_meth , * args ) do | * a | send ( meth , * a ) end end nil end ) end end
If the normal routing tree doesn't handle an action, try each class level route
to see if it matches.
If the normal routing tree doesn ' t handle an action try each class level route to see if it matches .
# Reset the response so it doesn't inherit the status or any headers from # the original response.
result