Add docstring to class generator