2010/2/8 Mikkel Kroman <mk / maero.dk>: > Thanks for both your answer, but what I want to achieve is something > like the following: > > (This is a early stage irc lib I'm using) > > #!/usr/bin/env ruby > # encoding: utf-8 > require File.dirname(__FILE__) + '/lib/irc' > > IRC::Connect hostname: 'irc.phora.net' do > ¨Βεζ οξίνεσσαηε¨ξιγλ¬ γθαξξεμ¬ νεσσαηε¬ ͺαςησ© > This is what I want it to be like: > nick.say("Hello there, #{nick}!") > or atleast something like that. > but for now, I'm stuck with this: > ¨Βςιφνση¨ξιγλ¬ ’Θεμμο τθεςε¬ £ϋξιγλύ‘’© > is it maybe possible to make some > kind of 'alias'? > ¨Βξδ > end > > nick is a string and I think it's too exaggerated to make nick have it's > own kind of class, just to have this method. Oh, and another thing.. I would not say that. A nick could have other methods as well, e.g. #state, #online? etc. Actually it's not so much a nick but rather a User or a Chatter. Software engineering is all about finding proper abstractions. :-) > 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. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/