mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Updated the doc for const_regexp [ci skip]
This commit is contained in:
parent
3b7192d21e
commit
f9086d63cd
1 changed files with 3 additions and 1 deletions
|
@ -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("::")
|
||||
|
||||
|
|
Loading…
Reference in a new issue