Skip to content

Commit

Permalink
updating description of how class_attribute works
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj Singh committed Jul 28, 2010
1 parent 67e79cf commit f3b50b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions activesupport/lib/active_support/core_ext/class/attribute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ class Class
# Subclass.setting # => false
# Base.setting # => true
#
# In the above case as long as Subclass does not assign a value to setting
# by performing <tt>Subclass.setting = _something_ </tt>, <tt>Subclass.setting</tt>
# would read value assigned to parent class. Once Subclass assigns a value then
# the value assigned by Subclass would be returned.
#
# This matches normal Ruby method inheritance: think of writing an attribute
# on a subclass as overriding the reader method.
#
Expand Down

0 comments on commit f3b50b1

Please sign in to comment.