Mega Code Archive

 
Categories / Ruby / Language Basics
 

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.