aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorBen Orenstein <ben.orenstein@gmail.com>2011-02-19 12:56:55 -0500
committerBen Orenstein <ben.orenstein@gmail.com>2011-02-19 12:57:06 -0500
commit262dd965df5c46d674f76928a46a76c6132c9e35 (patch)
treeeeb501c9e18427f088da9eab65f4c2bcc3e997e0 /activesupport
parentb3e5e25829451acf28c64886b6d9117d2430f7be (diff)
downloadrails-262dd965df5c46d674f76928a46a76c6132c9e35.tar.gz
rails-262dd965df5c46d674f76928a46a76c6132c9e35.tar.bz2
rails-262dd965df5c46d674f76928a46a76c6132c9e35.zip
Improve clarity of example. Make it follow guidelines for output display.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb b/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb
index 0b6731883c..e3259a0a84 100644
--- a/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb
+++ b/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb
@@ -7,11 +7,11 @@ class Module
# attr_accessor_with_default :age, 25
# end
#
- # some_person.age
- # => 25
- # some_person.age = 26
- # some_person.age
- # => 26
+ # person = Person.new
+ # person.age # => 25
+ #
+ # person.age = 26
+ # person.age # => 26
#
# To give attribute <tt>:element_name</tt> a dynamic default value, evaluated
# in scope of self: