diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-05-29 00:00:32 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-05-29 00:00:32 -0500 |
commit | 5487daba9736c70b3e2ae868f3e92b24f6620273 (patch) | |
tree | 5dded44904f6cd7e79a98758662ac8064cd444ec /activesupport | |
parent | 34f82abf017a152bace9cbb12b69ef2076b6d67d (diff) | |
download | rails-5487daba9736c70b3e2ae868f3e92b24f6620273.tar.gz rails-5487daba9736c70b3e2ae868f3e92b24f6620273.tar.bz2 rails-5487daba9736c70b3e2ae868f3e92b24f6620273.zip |
fix example format and add markup in Module#mattr_accessor documentation [ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/attribute_accessors.rb | 20 |
1 files changed, 10 insertions, 10 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 b8cb2e347f..672cc0256f 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb @@ -46,19 +46,19 @@ class Module # Extends the module object with module and instance accessors for class attributes, # just like the native attr* accessors for instance attributes. # - # module AppConfiguration - # mattr_accessor :google_api_key + # module AppConfiguration + # mattr_accessor :google_api_key # - # self.google_api_key = "123456789" - # end + # 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!" + # 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 <tt>instance_writer: false</tt>. + # To opt out of the instance reader method, pass <tt>instance_reader: false</tt>. + # To opt out of both instance methods, pass <tt>instance_accessor: false</tt>. def mattr_accessor(*syms) mattr_reader(*syms) mattr_writer(*syms) |