Can I get all @examples from my YARD docs?

124 views Asked by At

I would like to extract all the @example code in my YARD documentation. Then I can test them to alert me if they need to be updated.

For example...

# @example
#   obj = Some::Object.new
#   obj.method(1,2,3)
def method(a, b, c)
  ...
end

I would like to receive:

obj = Some::Object.new
obj.method(1,2,3)
0

There are 0 answers