Skip to content

Commit

Permalink
prefer qualified constant "name" to "reference expression", much simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Oct 30, 2011
1 parent c809de8 commit c6b933f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions railties/guides/source/active_support_core_extensions.textile
Expand Up @@ -729,7 +729,7 @@ h5. Qualified Constant Names

The standard methods +const_defined?+, +const_get+ , and +const_set+ accept
bare constant names. Active Support extends this API to be able to pass
relative qualified constant reference expressions.
relative qualified constant names.

The new methods are +qualified_const_defined?+, +qualified_const_get+, and
+qualified_const_set+. Their arguments are assumed to be qualified constant
Expand Down Expand Up @@ -1655,7 +1655,7 @@ NOTE: Defined in +active_support/core_ext/string/inflections.rb+.

h5. +demodulize+

Given a string with a qualified constant reference expression, +demodulize+ returns the very constant name, that is, the rightmost part of it:
Given a string with a qualified constant name, +demodulize+ returns the very constant name, that is, the rightmost part of it:

<ruby>
"Product".demodulize # => "Product"
Expand Down

0 comments on commit c6b933f

Please sign in to comment.