Use classmethod for generate_doc