rGenetic Code Documentation Standards ================================================================================ The head of each file should contain a list the name of the file(including namespace), author, and date last modified. There should also be a listing of which classes and modules are contained within. # rgenetic/anyfile.rb # Author: Matthew Linnell # Date: 7/22/2003 #------------------------------------------------------------------------------- # class MyObject # class AnotherObject #=============================================================================== Documentation for rGenetic will be done using rDoc standard formatting. Below is an example of what should appear immidiately prior to a function definition. #--------------------------------------------------------------------------- # * *Function*: Returns the sum of each of the elements in the passed array # # * *Usage* : sum_array( arr_in ) # * *Args* : # - +arr_in+ -> Of type Array, the array whose sum we wish to know # * *Returns* : # - +sum+ -> The sum of the Array # * *Throws* : # - +none+ #=========================================================================== Note that args, returns, and throws are present as "none" if there are none, as opposed to removing them entirely from the comment. This makes sure that we aren't left wondering if they exist or not. In-line commenting is encouraged, particularly in algorithms or sequences whose function (and how that function is achieved) is not immediately obvious. I'll leave this up to your best judgement :).