I have a class that I create from a factory function like this:
Cake = MyProject.Struct(:type, :price)
In Yard, it's simply displayed along with my constants:
Cake = Struct(:type, :price)
I want it to show up in the "Classes: " list. After reading up on the docs, I was lead to believe that this would work:
# @!parse class Cake; end
Cake = MyProject.Struct(:type, :price)
But it literally changed nothing.
Is it possible to get Yard to document dynamically created classes as classes?
It has been quite some time since this was asked, but while googling for an answer myself, I was lead here, and figured to post my solution in case anyone else stumbles here.
I found that this solved it:
class Cake < Struct.new(:type, :cake)
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With