I'm currently working on a gem and writing documentation for it. I currently have a class that has several method defined using defined_method
as follows:
class Client
['one', 'two'].each do |method_name|
# Sets the value
# @param argument the argument to set.
define_method("set_#{method_name}") do |argument|
# Method content
end
end
end
I'm trying to document these methods using YARD, but when generating the documentation of the project, theses methods do not appear in the class documentation.
Does anyone know how I could document these? Am I missing something?
one
andtwo
methods, make them their own methods. Savedefine_method
for when it's needed. – Romp