# Exlcude method from rdoc

**URL:** <https://www.ruby-forum.com/t/exlcude-method-from-rdoc/62404>\
**Category:** Ruby\
**Created:** [June 4, 2006, 4:35am UTC](https://www.ruby-forum.com/t/exlcude-method-from-rdoc/62404 "2006-06-04T04:35:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![squeegy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Post date:** [June 4, 2006, 4:35am UTC](https://www.ruby-forum.com/t/exlcude-method-from-rdoc/62404/1 "2006-06-04T04:35:28Z")

</div>

What’s the sytax to exclude a method form a generated rdoc? Just a  
method in a class, not an entire class or module.

Thanks in advance,  
-Alex

---

<div class="post-metadata">

**Author:** ![squeegy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Post date:** [June 4, 2006, 4:54am UTC](https://www.ruby-forum.com/t/exlcude-method-from-rdoc/62404/2 "2006-06-04T04:54:17Z")

</div>

Alex W. wrote:

> What’s the sytax to exclude a method form a generated rdoc? Just a  
> method in a class, not an entire class or module.

def foo # :nodoc:  
end

Works with class defs too.

---

<div class="post-metadata">

**Author:** ![squeegy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Post date:** [June 4, 2006, 5:04am UTC](https://www.ruby-forum.com/t/exlcude-method-from-rdoc/62404/3 "2006-06-04T05:04:08Z")

</div>

Joel VanderWerf wrote:

> Alex W. wrote:
> 
> > What’s the sytax to exclude a method form a generated rdoc? Just a  
> > method in a class, not an entire class or module.
> 
> def foo # :nodoc:  
> end
> 
> Works with class defs too.

Thank you, I wasn’t sure if that would nuke the documentation for the  
entire module or not.
