Methods
Attributes
[R] | docs |
Public Instance methods
The idea here is to have dynamic docs.
doc "X does such and such" doc "it is very powerful" class X doc "f does such and such" doc "it is where the power lies" def f ... end end
One of the great things about doc, is that it can be used to "inherit" documentation.
[ show source ]
# File lib/quarry/document.rb, line 23 def doc(str) $_doc << string end
[ show source ]
# File lib/quarry/document.rb, line 27 def method_added(meth) @docs ||= {} @docs[self, meth] << $_doc $_doc.clear nil end