Organizing My Ruby Code - Do I use modules

I need a little help determining the best way to organize my Ruby
code. I’ve got a script I’m writing. Lets call it somecoolscript.rb. I
have also created three (3) utility classes that I need to use in
somecoolscript.rb. How do I “import” those classes into
somecoolscript.rb so they are available. Do I need to put the three
(3) utility classes in a module and then require this module in
somecoolscript? Do I need to put my modules on some type of class path
so the Ruby interpreter can find them when it executes
somecoolscript.rb?

Thanks,

The SketchUp Artist

Read pickaxe about require/load.

having said that…

require ‘yoursupportlib’

where ‘yoursupportlib’ is located in Ruby’s $LOAD_PATH.

you can setup you lib according to setup.rb (look it up) and run i to
copy your files into the right places.

brief, but HTH.
T.

On Jul 27, 10:22 pm, Trans [email protected] wrote:

where ‘yoursupportlib’ is located in Ruby’s $LOAD_PATH.

And you can find the value of $LOAD_PATH by:

ruby -e “puts $:”

Vasudev Ram
Biz site: http://www.dancingbison.com
Blog: http://jugad.livejournal.com
PDF creation/conversion toolkit:
dancingbison.com

2007/7/27, Trans [email protected]:

Read pickaxe about require/load.

having said that…

require ‘yoursupportlib’

where ‘yoursupportlib’ is located in Ruby’s $LOAD_PATH.

The current directory works as well.

Kind regards

robert

On Jul 27, 10:22 pm, Trans [email protected] wrote:

where ‘yoursupportlib’ is located in Ruby’s $LOAD_PATH.

And you can find the value of $LOAD_PATH by:

ruby -e “puts $:”

Vasudev Ram
Biz site: http://www.dancingbison.com
Blog: http://jugad.livejournal.com
PDF creation/conversion toolkit:
dancingbison.com