Skip to content
Browse files

Merge pull request #6213 from frodsan/cut_docs_dup

Removing attribute_accessor docs duplication
  • Loading branch information...
2 parents ad4d408 + 16a9a87 commit 5059c323b042574a07b45f761bacb2964241954b @vijaydev vijaydev committed May 8, 2012
Showing with 0 additions and 23 deletions.
  1. +0 −23 activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
View
23 activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
@@ -2,29 +2,6 @@
# 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.

0 comments on commit 5059c32

Please sign in to comment.
Something went wrong with that request. Please try again.