Namrata K. wrote in post #1039581:
> What I want to be able to do is,in profession object, add a method
> called "users"(shown above) which will return an instance of that
> usertype util object?
>
> Then if p1 = Usertype.new
> I should be able to access add by using p1.users.add(a,b)
>
> Is this possible?

I think you mean if p1 = Profession.new

Then in that case all you need is:

class Profession
  def users
    Usertype.new
  end
end

In this case it's not very useful. However when the throw-away object 
also carries some state from its creator, then it can be very useful.

-- 
Posted via http://www.ruby-forum.com/.