diff options
author | Ben Orenstein <ben.orenstein@gmail.com> | 2011-02-19 12:56:55 -0500 |
---|---|---|
committer | Mani Tadayon <bowsersenior@gmail.com> | 2011-02-21 13:44:18 -0800 |
commit | a40b7159d90d0c2f80b068c7dd251b3627446fed (patch) | |
tree | c57bf2c495a5931643fffa217cb2fbcf3a543ccc | |
parent | 797af0faa54721046fd72974d8241e80fa89e182 (diff) | |
download | rails-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.rb | 10 |
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: |