Ok I have task where I have to extract methods and comments from ruby file and store them in db as reference
before this I manage to spin off with this piece of Code to achieve the same
module Describe
def describe(method_name,description)
@@method_descriptions ||= []
@@method_descriptions << [method_name,description]
end
def method_descriptions
Hash[@@method_descriptions]
end
end
and then use something like this inside a class
class A
extend Describe
def call_me
end
describe :call_me,"This method is you to invoke"
end
But the Fact that I have to write the some code to this is and also they aren't the actual comment
Can I achieve the same thing with YARD