How can I document implicit methods inside rail models?

I use YARD in my Rails project and wondered how I will document the inherited / executable methods on the Rails model? For example, documenting the existence of an attribute first_namein a model User.

+3
source share
1 answer

You can not do this, IMHO.

The problem is that these methods do not really exist; They are created on the fly using method_missinghooks on the first call at runtime.

"" . , NaturalDocs , , . YARD, , , .

!

0

Source: https://habr.com/ru/post/1746041/


All Articles