Skip to content

Commit 4f031c8

Browse files
author
Francesco Rodriguez
committed
update Module#mattr_accessor documentation [ci skip]
1 parent 4df16f3 commit 4f031c8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

activesupport/lib/active_support/core_ext/module/attribute_accessors.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ def #{sym}=(obj)
4848
#
4949
# module AppConfiguration
5050
# mattr_accessor :google_api_key
51-
# self.google_api_key = "123456789"
5251
#
53-
# mattr_accessor :paypal_url
54-
# self.paypal_url = "www.sandbox.paypal.com"
52+
# self.google_api_key = "123456789"
5553
# end
5654
#
55+
# AppConfiguration.google_api_key # => "123456789"
5756
# AppConfiguration.google_api_key = "overriding the api key!"
57+
# AppConfiguration.google_api_key # => "overriding the api key!"
5858
#
59-
# To opt out of the instance writer method, pass :instance_writer => false.
60-
# To opt out of the instance reader method, pass :instance_reader => false.
61-
# To opt out of both instance methods, pass :instance_accessor => false.
59+
# To opt out of the instance writer method, pass instance_writer: false.
60+
# To opt out of the instance reader method, pass instance_reader: false.
61+
# To opt out of both instance methods, pass instance_accessor: false.
6262
def mattr_accessor(*syms)
6363
mattr_reader(*syms)
6464
mattr_writer(*syms)

0 commit comments

Comments
 (0)