diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2015-05-04 14:43:41 +0200 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2015-05-04 14:43:41 +0200 |
commit | a8aa8b7fc37784b36a41834af0272907bb07eeb8 (patch) | |
tree | bbd108de68e35b956d61b7057492c430b776e616 | |
parent | 21c74bd769f6c873453e9244b0de7ced40a532be (diff) | |
download | rails-a8aa8b7fc37784b36a41834af0272907bb07eeb8.tar.gz rails-a8aa8b7fc37784b36a41834af0272907bb07eeb8.tar.bz2 rails-a8aa8b7fc37784b36a41834af0272907bb07eeb8.zip |
Tiny documentation edits [ci skip]
* Fix a few typos
* Wrap lines to 80 chars
* Use `+` instead of `<tt>`
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/deprecation/proxy_wrappers.rb | 30 | ||||
-rw-r--r-- | railties/lib/rails/rack/logger.rb | 5 |
3 files changed, 20 insertions, 17 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index c47e5d5245..bc5ef1abc9 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -26,7 +26,7 @@ module ActionDispatch # representing the filename. Otherwise, false is returned. # # Used by the `Static` class to check the existence of a valid file - # in the server's `public/` directory. (See Static#call) + # in the server's `public/` directory (see Static#call). def match?(path) path = URI.parser.unescape(path) return false unless path.valid_encoding? diff --git a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb index dedcdfdb60..dfdb8034e5 100644 --- a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb +++ b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb @@ -25,17 +25,17 @@ module ActiveSupport end end - # DeprecatedObjectProxy transforms an object into a deprecated object. It takes an object, - # a deprecation message, and optionally a deprecator. The deprecator defaults to - # <tt>ActiveSupport::Deprecator</tt> if none is specified. + # DeprecatedObjectProxy transforms an object into a deprecated one. It + # takes an object, a deprecation message and optionally a deprecator. The + # deprecator defaults to +ActiveSupport::Deprecator+ if none is specified. # # deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated") - # # => <Object:0x007fb9b34c34b0> + # # => #<Object:0x007fb9b34c34b0> # # deprecated_object.to_s # DEPRECATION WARNING: This object is now deprecated. # (Backtrace) - # # => "<Object:0x007fb9b34c34b0>" + # # => "#<Object:0x007fb9b34c34b0>" class DeprecatedObjectProxy < DeprecationProxy def initialize(object, message, deprecator = ActiveSupport::Deprecation.instance) @object = object @@ -53,14 +53,15 @@ module ActiveSupport end end - # DeprecatedInstanceVariableProxy transforms an instance variable into a deprecated - # instance variable. It takes an instance of a class, a method on that class, and an - # instance variable. It optionally takes a deprecator as the last argument. The deprecator - # defaults to <tt>ActiveSupport::Deprecator</tt> if none is specified. + # DeprecatedInstanceVariableProxy transforms an instance variable into a + # deprecated one. It takes an instance of a class, a method on that class + # and an instance variable. It optionally takes a deprecator as the last + # argument. The deprecator defaults to +ActiveSupport::Deprecator+ if none + # is specified. # # class Example # def initialize - # @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request, deprecator) + # @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request) # @_request = :special_request # end # @@ -102,10 +103,11 @@ module ActiveSupport end end - # DeprecatedConstantProxy transforms a constant into a deprecated constant. It takes the names of an old - # (deprecated) constant and a new contstant (both in string form), and optionally a deprecator. The - # deprecator defaults to <tt>ActiveSupport::Deprecator</tt> if none is specified. The deprecated constant - # now returns the return value of the new constant. + # DeprecatedConstantProxy transforms a constant into a deprecated one. It + # takes the names of an old (deprecated) constant and of a new contstant + # (both in string form) and optionally a deprecator. The deprecator defaults + # to +ActiveSupport::Deprecator+ if none is specified. The deprecated constant + # now returns the value of the new one. # # PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) # diff --git a/railties/lib/rails/rack/logger.rb b/railties/lib/rails/rack/logger.rb index 7aaa353b91..12676b18bc 100644 --- a/railties/lib/rails/rack/logger.rb +++ b/railties/lib/rails/rack/logger.rb @@ -8,8 +8,9 @@ module Rails module Rack # Sets log tags, logs the request, calls the app, and flushes the logs. # - # Log tags (+taggers+) can be an Array containing: methods that the <tt>request</tt> object responds to, a Proc - # that accepts an instance of the <tt>request</tt> object, or something that responds to <tt>to_s</tt>. + # Log tags (+taggers+) can be an Array containing: methods that the +request+ + # object responds to, objects that respond to +to_s+ or Proc objects that accept + # an instance of the +request+ object. class Logger < ActiveSupport::LogSubscriber def initialize(app, taggers = nil) @app = app |