From: "Iñaki Baz Castillo" Date: 2011-08-15T04:42:33+09:00 Subject: Re: class inheritance and class constants 2011/8/14 Chris White : > ------------------------------- > class Server >  def self.listen >    puts "Listening on #@ip" >  end > end > > class UdpServer < Server >  @ip = "1.2.3.4" > end > > class TcpServer < Server >  @ip = "5.6.7.8" > end > > UdpServer.listen > TcpServer.listen > ------------------------------- Yes, I also us that commonly. However I didn't know that class instance variables can be defined out of a method. I expected: class TcpServer < Server def self.init_variables @ip="5.6.7.8" end end Good to know that it's not needed :) -- Iñaki Baz Castillo