Missing top-level documentation comment for
class UnDoced
.25 end
26end
27
28class UnDoced29 def some_doc
30 :doc
31 end
Missing top-level documentation comment for
class AnotherOne
.12
13OpenSSL::Cipher::AES.new(128, :GCM)
14
15class AnotherOne16 def some_method
17 :sme
18 end
Description
Top-level documentation comment should be included in classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.
The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.
Bad practice
class Person
# ...
end
Recommended
# Description/Explanation of Person class
class Person
# ...
end