Method: String#demodulize
- Defined in:
- activesupport/lib/active_support/core_ext/string/inflections.rb
#demodulize ⇒ Object
Removes the module part from the constant expression in the string.
'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections"
'Inflections'.demodulize # => "Inflections"
'::Inflections'.demodulize # => "Inflections"
''.demodulize # => ''
See ActiveSupport::Inflector.demodulize.
See also deconstantize.
162 163 164 |
# File 'activesupport/lib/active_support/core_ext/string/inflections.rb', line 162 def demodulize ActiveSupport::Inflector.demodulize(self) end |