2011/8/14 Chris White <cwprogram / live.com>:
> -------------------------------
> 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 :)

-- 
Iaki Baz Castillo
<ibc / aliax.net>