What is the equivalent of a Python docstring in Ruby?

parzival picture parzival · Feb 15, 2011 · Viewed 14.8k times · Source

In Python, you can access an object's docstring by using obj.__doc__. What is the equivalent action in Ruby?

Answer

Tarantula picture Tarantula · Feb 15, 2011

Ruby does not have a Python __doc__ equivalent. They often use Rdoc Format for documentation.