I would like to document a few methods in an anonymous class for rdoc.
I know that alternative documetation tool exists, such as yard, but not sure the project owners are ready for change they inventory for sake of few methods.
I tried use :method:
directive, but no luck so far
Tried with ruby 2.7, rdoc 6.3
# (c) 2024 Big Corporation# = ExampleModule gives a great example## This module contains an example of documenting an anonymous class created with Class.new.module ExampleModule # Create an anonymous class using Class.new, almost the same as # class AnonymousClass # and give a closure # but fails rdoc AnonymousClass = Class.new do ## # :method: initialize def initialize(param1, param2) # ... initialization code ... end ## # :method: example_method # == example_method # # An example method in the anonymous class. def example_method # ... method implementation ... end endend