From: ts Date: 2001-10-27T22:09:51+09:00 Subject: [ruby-talk:23620] Re: sleeping, calling methods inside class defs >>>>> "T" == Tobias Reif writes: T> class Tobi T> def sleep you define the instance method sleep (or Tobi#sleep) T> print "rzzzzz..\n" T> end T> sleep you call the method sleep in the class context (i.e. self is Tobi), because there is no class method with the name `sleep' (only instance method) it find Kernel#sleep and call it. T> class Tobi T> def hi T> print "hi!\n" T> end T> hi T> end Same here you define Tobi#hi (instance method) and call Tobi::hi (class method) T> works; but how can I use the method inside the class? You need to define a class method, for example class Tobi def self.hi # or Tobi::hi print "hi !\n" end hi end Guy Decoux