From: "Iñaki Baz Castillo" Date: 2008-09-06T04:48:45+09:00 Subject: Re: accessor methods for class methods El Viernes, 5 de Septiembre de 2008, Jason Lillywhite escribió: > It seems odd that cattr_* (i.e. cattr_accessor, cattr_reader, > cattr_writer) is not in the native Ruby and that you have to require > active support and rubygems to get this to work. Including the rails > stuff appears to slow things down a little. Why is this not built in the > native Ruby source? Note that you can do the same using: ------------ class MyClass class << self attr_accessor :class_attribute_1, :class_attribute_2 end end ----------- So you can use it: ---------- MyClass.class_attribute_1 = something --------- -- Iñaki Baz Castillo