Closed 2called-chaos closed 12 years ago
You would write a template customization or plugin to display this. There is documentation in the yard docs on writing custom templates (see http://yardoc.org/guides). In this case you would customize the method_details template to show this information. You could just collect all methods that have the correct @depends
tag. It might look something like:
Registry.all(:method).select {|o| o.has_tag?(:depends) && o.tag(:depends).text == object.path }
As a performance note, the above is a very naive implementation, and would be very slow. You could optimize it easily to map all the affected methods in one pass (O(n)), rather than looping over all methods for each method template (O(n^2))
Can anybody tell me if this is possible in YARD and if not if it will be added or not.
I want to declare dependencies like this:
Just listing the dependencies would be easily doen with a custom tag. But now I want to automatically list all methods depending on fancy_magic:
I hope it is clear what I mean and someone can help me ;-) Thank you in advance!