aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-05-08 16:07:30 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-05-08 16:07:30 -0500
commit16a9a877288dabcfbeb00cfb681f7c19a8a1e8a3 (patch)
tree7c54f441ee5a86f96b6f605377c1aafcd7525811 /activesupport/lib
parentad4d4088c49be013c2248b1cf2ca92b074e8ac03 (diff)
downloadrails-16a9a877288dabcfbeb00cfb681f7c19a8a1e8a3.tar.gz
rails-16a9a877288dabcfbeb00cfb681f7c19a8a1e8a3.tar.bz2
rails-16a9a877288dabcfbeb00cfb681f7c19a8a1e8a3.zip
removing docs duplication
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/class/attribute_accessors.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
index 182bc1ec6f..6e66841019 100644
--- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
+++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
@@ -2,29 +2,6 @@ require 'active_support/core_ext/array/extract_options'
# Extends the class object with class and instance accessors for class attributes,
# just like the native attr* accessors for instance attributes.
-#
-# Note that unlike +class_attribute+, if a subclass changes the value then that would
-# also change the value for parent class. Similarly if parent class changes the value
-# then that would change the value of subclasses too.
-#
-# class Person
-# cattr_accessor :hair_colors
-# end
-#
-# Person.hair_colors = [:brown, :black, :blonde, :red]
-# Person.hair_colors # => [:brown, :black, :blonde, :red]
-# Person.new.hair_colors # => [:brown, :black, :blonde, :red]
-#
-# To opt out of the instance writer method, pass :instance_writer => false.
-# To opt out of the instance reader method, pass :instance_reader => false.
-# To opt out of both instance methods, pass :instance_accessor => false.
-#
-# class Person
-# cattr_accessor :hair_colors, :instance_writer => false, :instance_reader => false
-# end
-#
-# Person.new.hair_colors = [:brown] # => NoMethodError
-# Person.new.hair_colors # => NoMethodError
class Class
# Defines a class attribute if it's not defined and creates a reader method that
# returns the attribute value.