From: James Ponder Date: 2001-04-23T09:16:42+09:00 Subject: [ruby-talk:14052] OO I'm new to Ruby, and am just starting my first app - coming from a C and Perl background I'm starting to have OO-related questions. Are there any books that people would recommend to get an idea at good practices? For example - I have built an Options class, which when instantiated takes a filename, which contains x=y lines, and acts a bit like a Hash - I would have thought this would be a fairly common object that programs have. My question would be how are parts of a program supposed to talk to this Options object? - I could instantiate an Options object and then pass it to each object as one of its initialization parameters - I could instantiate an Options object and place it in $OPTIONS so that each object could access that object directly - I could instantiate an Options object and store it in a Resources class using a class method, and then use another class method to read the options back, e.g. Resources.options(...) - I could make Options not instantiatable at all and just have class methods to load and access the options Or something else...? Any advice appreciated. Best wishes, James -- James Ponder; www.squish.net