# File lib/grape/endpoint.rb, line 146
    def mount_in(router)
      if endpoints
        endpoints.each { |e| e.mount_in(router) }
      else
        reset_routes!
        routes.each do |route|
          methods = [route.request_method]
          if !namespace_inheritable(:do_not_route_head) && route.request_method == Grape::Http::Headers::GET
            methods << Grape::Http::Headers::HEAD
          end
          methods.each do |method|
            unless route.request_method.to_s.upcase == method
              route = Grape::Router::Route.new(method, route.origin, route.attributes.to_h)
            end
            router.append(route.apply(self))
          end
        end
      end
    end