libsk.rb

I'm going to (have) start putting together a library of (hopefully) useful Ruby/SketchUp helper methods. Maybe called sk.rb, or libsk.rb.

I want to organize it in a way so that a user can require the entire lib, a subset of it, or an individual part of it. I think it can be organized into folders and sub-folders. For example, take Group.moveto() . Here is an example folder layout and usage:

*/Plugins/
sk.rb
sk/
groups.rb
groups/
moveto.rb

And here is the example usage:


# require everything.
require "sk.rb"

# include everything in the groups folder only.
require "sk/groups.rb"

# include only the moveto method in the groups folder.
require "sk/groups/moveto.rb"

You can download an example help file.

Thoughts?

No comments:

Popular Posts (Last 30 Days)