From: "Jørgen P. Tjernø" Date: 2006-06-21T14:23:21+09:00 Subject: Re: creating and using modules Parv G wrote: > Hi, > Newbie Question: > > I'm trying to write a simple module/class, in it i'm trying to capture > the repetitive, that i can reuse to make my life easier. > > How do i setup this module, so i can make refernces to it? > Where do i need to store the actual file? > I would like to know how can i make references to this module? > > if somebody can point me to the right direction, that'll be very helpul. > appreciate the help. > Parvinder > Hi, I'm not sure I 100% understand what you want, but here goes: You generally set up a class in a stand-alone rb-file. ("class MyClass; ..; end" in myclass.rb, e.g.) Then, you either put it in one of the system library dirs, or below the dir that your project is stored in. Inside your program, you have a line like "require 'myclass'", then use it like any other class. .. Is this what you're asking, did it answer your question? -- Kindest regards / Med vennlig hilsen, Jørgen P. Tjernø