I actually did this by fine-tuning CodeT5 for generating docstrings for Ruby code.
The model is on the hub: nielsr/codet5-small-code-summarization-ruby · Hugging Face 1
The notebook used to fine-tune T5 can be found here 3.