From: Ken Bloom Date: 2006-10-11T00:35:16+09:00 Subject: Re: "def self.method" vs "class << self; def method" On Tue, 10 Oct 2006 12:28:02 +0900, Jeff wrote: > Ken Bloom wrote: >> But you can't do the second one with most >> metaprogrammed methods, for example attr_accessor. >> > > Can you elaborate a little bit more? > > Jeff There's no analagous syntax to using def self.foo; end for the attr_accessor method (and the like). There, you must use class << self; attr_accessor :foo; end --Ken -- Ken Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/ I've added a signing subkey to my GPG key. Please update your keyring.