diff options
author | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-24 21:14:38 +0000 |
---|---|---|
committer | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-24 21:14:38 +0000 |
commit | 014a9e05877951f901092297f49a7ac2b2396939 (patch) | |
tree | 85ac1c34ac67b740cd5b4eac6fec6a71961af0b1 /doc/syntax/refinements.rdoc | |
parent | 3c16862c85ad87bdbd7b09b74331e52d8c068186 (diff) |
Small improvement in refinements docs
Move general statement about refinements of modules
from example to the top of the document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/syntax/refinements.rdoc')
-rw-r--r-- | doc/syntax/refinements.rdoc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/syntax/refinements.rdoc b/doc/syntax/refinements.rdoc index 34ca3a1983..e2d9cdc407 100644 --- a/doc/syntax/refinements.rdoc +++ b/doc/syntax/refinements.rdoc @@ -7,7 +7,7 @@ changes. This can cause unintended side-effects or breakage of programs. Refinements are designed to reduce the impact of monkey patching on other users of the monkey-patched class. Refinements provide a way to extend a -class locally. +class locally. Refinements can modify both classes and modules. Here is a basic refinement: @@ -26,7 +26,7 @@ Here is a basic refinement: end First, a class +C+ is defined. Next a refinement for +C+ is created using -Module#refine. Refinements can modify both classes and modules. +Module#refine. Module#refine creates an anonymous module that contains the changes or refinements to the class (+C+ in the example). +self+ in the refine block is |