aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Orenstein <ben.orenstein@gmail.com>2011-02-19 12:56:55 -0500
committerMani Tadayon <bowsersenior@gmail.com>2011-02-21 13:44:18 -0800
commita40b7159d90d0c2f80b068c7dd251b3627446fed (patch)
treec57bf2c495a5931643fffa217cb2fbcf3a543ccc
parent797af0faa54721046fd72974d8241e80fa89e182 (diff)
downloadrails-a40b7159d90d0c2f80b068c7dd251b3627446fed.tar.gz
rails-a40b7159d90d0c2f80b068c7dd251b3627446fed.tar.bz2
rails-a40b7159d90d0c2f80b068c7dd251b3627446fed.zip
Improve clarity of example. Make it follow guidelines for output display.
-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: