diff options
author | Xavier Noria <fxn@hashref.com> | 2013-06-15 11:53:40 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-06-15 11:53:40 -0700 |
commit | c0058aec8f57d7acdc78d87efb32bfd5196c8a64 (patch) | |
tree | 92d6f911338d535b3a5c5d4d0dff8ba469914645 /activesupport | |
parent | 3b7192d21e673002070c852453b3cc32622a7591 (diff) | |
parent | f9086d63cdc21c4098ad3813640f059f0b8265b6 (diff) | |
download | rails-c0058aec8f57d7acdc78d87efb32bfd5196c8a64.tar.gz rails-c0058aec8f57d7acdc78d87efb32bfd5196c8a64.tar.bz2 rails-c0058aec8f57d7acdc78d87efb32bfd5196c8a64.zip |
Merge pull request #10954 from arunagw/update_docs_for_const_regexp
Updated the doc for const_regexp [ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 9f417af826..a2263fa4d0 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -319,7 +319,9 @@ module ActiveSupport private # Mount a regular expression that will match part by part of the constant. - # For instance, Foo::Bar::Baz will generate Foo(::Bar(::Baz)?)? + # + # const_regexp("Foo::Bar::Baz") # => /Foo(::Bar(::Baz)?)?/ + # const_regexp("::") # => /::/ def const_regexp(camel_cased_word) #:nodoc: parts = camel_cased_word.split("::") |