aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-02-21 11:42:26 +0100
committerXavier Noria <fxn@hashref.com>2011-02-21 11:42:26 +0100
commitf826e058355606d1b0503b0395519728335324f4 (patch)
tree4ad040efe6e5691bb408e8ebc0b6df4a216a1730 /activesupport/lib/active_support/core_ext/module
parentcd12c369961a612f6b083fc0e3b877cf59b737f4 (diff)
parentb481574a33764e2db1caf01c233a9c9ac9723780 (diff)
downloadrails-f826e058355606d1b0503b0395519728335324f4.tar.gz
rails-f826e058355606d1b0503b0395519728335324f4.tar.bz2
rails-f826e058355606d1b0503b0395519728335324f4.zip
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module')
-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: