I am using macros in the YARD doc tool and on some files they work and some they don't.
For example, I define a macro in one of my source files.
# @macro [new] my_macro
# @param [String] my_string it's a string!
#
def method(my_string)
#do stuff
end
Then in other files/classes I have:
#@macro my_macro
def a_method(my_string)
#do stuff
end
When I run the doc generator, the macro will work for many of the files but not all. My guess is that the doc generator isn't seeing the macro before generating the docs that failed. Once it reaches the macro, it works for every file after that. But that is a guess.
Is there a way to ensure that the macro works for every file? I suspect there is a disconnect between how I think macros work in YARD and how they actually do work.
P.S. For those that don't know what YARD is, you should check it out. It essentially does what rDoc does, but much much better. http://yardoc.org/