RDoc supports a number of modifiers within comments, along with command-line options.
# This is a class that does nothing class MyClass # This method is documented def some_method end def secret_method #:nodoc: end end
RDoc will ignore secret_method.
:nodoc: only operates directly upon the elements upon which it is placed.
To apply to the current element and all those beneath it (all methods within a class), do this:
# This is a class that does nothing class MyClass #:nodoc: all # This method is documented (or is it?) def some_method end def secret_method end end
Now none of MyClass is documented by RDoc.