# File lib/rack/mount/route.rb, line 99
    def generate(method, params = {}, recall = {}, options = {})
      if method.nil?
        result = @conditions.inject({}) { |h, (m, condition)|
          if condition.respond_to?(:generate)
            h[m] = condition.generate(params, recall, options)
          end
          h
        }
        return nil if result.values.compact.empty?
      else
        if condition = @conditions[method]
          if condition.respond_to?(:generate)
            result = condition.generate(params, recall, options)
          end
        end
      end

      if result
        @defaults.each do |key, value|
          params.delete(key) if params[key] == value
        end
      end

      result
    end