Open Aerilius opened 9 years ago
Yea, the SU docs are flawed like that. I really wish we were using a proper library like Ruby YARD. (I've put forth the suggestion and I'll be nagging to have it done.)
One note though - one doesn't really define new
in Ruby, one define initialize
. Then Ruby itself takes care of making new
call initialize
as well as other memory allocations.
The script that generated the original docs must not be used again to replace the files in the lib
folder. The documentation would be destroyed if this were done... unless the documentation was separated from the method stubs and then later re-combined into the documented source before running yard
.
This separating of method stub files and documentation files is something I've considered. I think it would make creating documentation specific for each SketchUp version easier to manage. It's just too time-consuming to take on right now.
Maybe yard has a tag which means "include lines from this file" at this location in the souce?
The script that generated the base files didn't prepend
.self
before class methods likeself.new
. Just a note to take care when documenting or if the script is run again. Also take care that it is not obvious from the SketchUp documentation, because it doesn't use proper Ruby class path syntax, but writes instance methods like class methods with a dot:Point3d.inspect
instead ofPoint3d#inspect