List in RDoc : RDoc « Language Basics « Ruby






List in RDoc

# The <tt>fir</tt> method returns a number.
# === Formula
#     _fir_ debt
#  -------------------- = some result
#  a/e
# === Parameters
# The parameters are:
# * <i>d</i> = debt
# * <i>e</i> = equity
# === Example
#  ratios = Ratios.new( 2, 9)
#  ratios.fir # => some text
#  ratios.fir 1, 5# => some text

 def fir( debt=@debt, equity=@equity )
   ratio = debt/(debt+equity).to_f
   printf( "The long-term debt ratio is %.2f.\n", ratio )
   ratio
 end

 








Related examples in the same category

1.RDoc Basics
2.documentation for the initialize method.
3.Processing Files with RDoc
4.RDoc options are used like this: rdoc [options] [names...]