I use class_eval to more class_eval describe a bunch of duplicate methods, something like this:
%w{greasy chunky bacon}.product(%w{flying sky poodle}).each do |a,b| class_eval "def #{a}_#{b}; do_something; end" end
I would like all the resulting methods to be included in the RDoc documentation. Is there an RDoc directive that manually adds a method to the list of methods for a class? I can not find him.
ruby metaprogramming rdoc
Alex d
source share