Skip to content
This repository
Browse code

update Module#mattr_accessor documentation [ci skip]

  • Loading branch information...
commit 4f031c8350b08eb0b1eb8abf7eb380654d284abc 1 parent 4df16f3
Francesco Rodríguez authored May 26, 2012
12  activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
@@ -48,17 +48,17 @@ def #{sym}=(obj)
48 48
   #
49 49
   #  module AppConfiguration
50 50
   #    mattr_accessor :google_api_key
51  
-  #    self.google_api_key = "123456789"
52 51
   #
53  
-  #    mattr_accessor :paypal_url
54  
-  #    self.paypal_url = "www.sandbox.paypal.com"
  52
+  #    self.google_api_key = "123456789"
55 53
   #  end
56 54
   #
  55
+  #  AppConfiguration.google_api_key # => "123456789"
57 56
   #  AppConfiguration.google_api_key = "overriding the api key!"
  57
+  #  AppConfiguration.google_api_key # => "overriding the api key!"
58 58
   #
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.
62 62
   def mattr_accessor(*syms)
63 63
     mattr_reader(*syms)
64 64
     mattr_writer(*syms)

0 notes on commit 4f031c8

Please sign in to comment.
Something went wrong with that request. Please try again.