Ruby - Module RDoc Formatting

Introduction

RDoc automatically recognizes paragraphs within your comments, and can even use spacing to recognize structure.

Here's an example of some of the formatting RDoc recognizes:

#= RDoc Example 
#  
#== This is a heading 
# 
#* First item in an outer list 
#  * First item in an inner list 
#  * Second item in an inner list 
#* Second item in an outer list 
#  * Only item in this inner list 
# 
#== This is a second heading 
#  
#Visit www.rubyinside.com 
# 
#== Test of text formatting features 
# 
#Want to see *bold* or _italic_ text? You can even embed 
#+text that looks like code+ by surrounding it with plus 
#symbols. Indented code will be automatically formatted: 
# 
#  class MyClass 
#    def method_name 
#      puts "test" 
#    end 
#  end 

Related Topic