1
0
Fork 0
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:
Arun Agrawal 2013-06-15 09:21:12 +02:00
parent 3b7192d21e
commit f9086d63cd

View file

@ -319,7 +319,9 @@ module ActiveSupport
private private
# Mount a regular expression that will match part by part of the constant. # 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: def const_regexp(camel_cased_word) #:nodoc:
parts = camel_cased_word.split("::") parts = camel_cased_word.split("::")