From: Robert Klemme Date: 2010-02-09T00:36:16+09:00 Subject: Re: String constant reference to another class instance variable 2010/2/8 Robert Klemme : > 2010/2/8 Mikkel Kroman : >> How would I be able to create User instances which also should have >> access to the IRC::Client's socket? Currently I'm using User.new("nick", >> @socket) which is, well.. yeah. > > You can do that.  What's best depends of course on your application > design which we don't know (yet).  Maybe you lay out your design - at > least on the high level - and then we can comment further. One more remark: if I would be doing this I would implement this with (at least) two layers. First, I'd look at the IRC protocol and implement classes that abstract this protocol. Then I'd create a "user friendly" layer. In that scenario a socket would not be seen to a User (or Nick) class because sockets would be buried in the IRC protocol layer. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/