aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-05-26 23:07:37 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-05-26 23:07:37 -0500
commit4f031c8350b08eb0b1eb8abf7eb380654d284abc (patch)
tree5c999a0146f39e41515225d6fde7881f41e51bec /activesupport/lib
parent4df16f3f3d2e2f806532ef2f698ae29f26df44db (diff)
downloadrails-4f031c8350b08eb0b1eb8abf7eb380654d284abc.tar.gz
rails-4f031c8350b08eb0b1eb8abf7eb380654d284abc.tar.bz2
rails-4f031c8350b08eb0b1eb8abf7eb380654d284abc.zip
update Module#mattr_accessor documentation [ci skip]
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/module/attribute_accessors.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
index f914425827..b8cb2e347f 100644
--- a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
+++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
@@ -48,17 +48,17 @@ class Module
#
# module AppConfiguration
# mattr_accessor :google_api_key
- # self.google_api_key = "123456789"
#
- # mattr_accessor :paypal_url
- # self.paypal_url = "www.sandbox.paypal.com"
+ # self.google_api_key = "123456789"
# end
#
+ # AppConfiguration.google_api_key # => "123456789"
# AppConfiguration.google_api_key = "overriding the api key!"
+ # AppConfiguration.google_api_key # => "overriding the api key!"
#
- # To opt out of the instance writer method, pass :instance_writer => false.
- # To opt out of the instance reader method, pass :instance_reader => false.
- # To opt out of both instance methods, pass :instance_accessor => false.
+ # To opt out of the instance writer method, pass instance_writer: false.
+ # To opt out of the instance reader method, pass instance_reader: false.
+ # To opt out of both instance methods, pass instance_accessor: false.
def mattr_accessor(*syms)
mattr_reader(*syms)
mattr_writer(*syms)