From: mark sparshatt Date: 2005-04-18T23:19:06+09:00 Subject: Re: [ANN] Article: Seeing Metaclasses Clearly why the lucky stiff wrote: > I've written a very nuts+bolts article on metaclasses (aka virtual > classes or metaobjects), since they still lurk under a shroud of fear > and enigma. > > > > I'm hoping this will help uncover the truth. If anything is unclear, > please report it. Shed a light. > One thing I found confusing was the comment for the class_def method ># Just defines a class method >def class_def name, &blk > class_eval { define_method name, &blk } >end However it actually defines an instance method require "metaid" class MyClass class_def "class_method" do puts "success" end end MyClass.class_method #=> undefined method "class_method" for MyClass:Class MyClass.new.class_method #=> success -- Mark Sparshatt