jimfoltz / SketchUp-Ruby-API-Doc

Help Document the SketchUp Ruby API using Yard
12 stars 5 forks source link

class methods miss `.self` #22

Open Aerilius opened 9 years ago

Aerilius commented 9 years ago

The script that generated the base files didn't prepend .self before class methods like self.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 of Point3d#inspect

thomthom commented 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.)

thomthom commented 9 years ago

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.

jimfoltz commented 9 years ago

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.

jimfoltz commented 9 years ago

Maybe yard has a tag which means "include lines from this file" at this location in the souce?