documentation for the initialize method. : RDoc « Language Basics « Ruby






documentation for the initialize method.



# The +new+ class method initializes the class.
# === Parameters
# * _debt_ = long-term debt
# * _equity_ = equity
# === Example
#  ratios = Ratios.new( 2, 9 )

 def initialize( debt, equity )
   @debt = debt
   @equity = equity
 end

Text enclosed by plus signs (+new+) will be shown in a typewriter font in XHTML
Text enclosed in underscores (as in _debt_) will be shown in italic. 
Lines preceded by asterisks (*) will be set off as bullets in the XHTML. 
Words preceded by equals signs (such as === Example) will be headings in the result; 
one = for a level-one heading, two == for a level two, and so forth). 
Text that is indented by several spaces will also show up in typewriter font.

 








Related examples in the same category

1.RDoc Basics
2.List in RDoc
3.Processing Files with RDoc
4.RDoc options are used like this: rdoc [options] [names...]