我想加载文件的描述并将它们全部打印在列表中。解决这个问题的最佳方法是什么?
用于说明:
#file 1.rb
desc("something")
more_method("something")
#file 2.rb
desc("something else")
more_method2("something")
#main.rb
class Get
def desc(x)
#want them here!
end
end
#def desc(x)
#here I can list my file descriptions but I want them inside the class.
#end