How to document use of Rails' url_helpers using YARD?
Asked Answered
H

1

7

When trying to generate YARD documentation for a service implemented with Rails, I get the following warning:

$ yardoc
[warn]: in YARD::Handlers::Ruby::MixinHandler: Undocumentable mixin: 
          YARD::Parser::UndocumentableError for class MyClass
[warn]:     in file 'app/models/my_class.rb':7:
  7: include Rails.application.routes.url_helpers

My understanding is that YARD cannot determine the mixin's type, since that's only available at runtime.

So what's the right thing to do here? Is it possible to correctly document the mixin? If not, how do I get rid of the warning?

Ham answered 20/6, 2012 at 12:9 Comment(1)
github.com/lsegal/yard/issues/1542Decree
C
0

Yard Undocumentable Error docs The description might answer your question. To get rid of the warning, as per my knowledge, running yardoc in quiet mode is the option:

yardoc -q /path/to/source/file 
Choler answered 27/7, 2012 at 6:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.