File: attribute_accessors.rb

# attribute_accessors.rb

Path: | lib/active_support/core_ext/class/attribute_accessors.rb
Last Update: | Tue Aug 12 12:29:52 -0600 2008

Extends the class object with class and instance accessors for class attributes, just like the native attr* accessors for instance attributes.

     class Person
       cattr_accessor :hair_colors
     end

     Person.hair_colors = [:brown, :black, :blonde, :red]

[Validate]