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

@ -319,7 +319,9 @@ def ordinalize(number)
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("::")