From: unbewusst.sein@... (=?ISO-8859-1?Q?Une_B=E9vue?=) Date: 2010-06-02T23:00:21+09:00 Subject: having a class method called only one time ? I'd like having a class method called only one time ? Is it possible ? suppose i do have a class "HFSFile" and i need to know the host ip. i don't want to call the method giving host ip each time i need it but only the first time even i do instantiate several HFSFile, mostly because it's time consuming : @h[:host_ip] = `curl -s http://whatismyip.org`.chomp it is even in a while loop because sometimes curl returns ''. -- � Les faiblesses des hommes font la force des femmes. � (Voltaire)